Skip to content

Takes in the contents of an HTML file & generates a CSS 'file' of all the classes & IDs.

Notifications You must be signed in to change notification settings

demaceo/html-to-css

Repository files navigation

HTML to CSS Generator

This project is a simple React application that helps users automatically generate CSS skeletons based on the class, className, and id attributes found in a given HTML snippet. Users can paste their HTML content into the app, and it will identify unique class and id values, returning a ready-to-use CSS structure with empty selectors for easy styling.

Features

  • User-Friendly Interface: Paste your HTML content in a dedicated input area, and generate CSS with a single click.
  • Class & ID Detection: Automatically detects both class and className attributes, as well as id attributes in the HTML.
  • Copy-Ready CSS Output: Displays generated CSS in a formatted, read-only field, allowing for easy copying and pasting into your CSS files.

How It Works

  • Paste any HTML content into the input area.
  • Click the "Generate CSS" button.
  • View the generated CSS in the output field, which includes all unique classes and IDs found in the HTML.

This tool is useful for quickly scaffolding a CSS file based on HTML content and is especially helpful for rapid prototyping or starting new web projects.

About

Takes in the contents of an HTML file & generates a CSS 'file' of all the classes & IDs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published