Generate CSS from inline css of DOM elements


Hi, I made a document, big, full of inline css, and I know that mixing css with html, using the style attribute directly on the element is bad practice…

But now, do you have a way to generate a common, unique css, grouping all inline css together? Or in this case, the business is to do it in the arm?


Dreamweaver has a tool for this.

  1. In Code view (View > Code), select the entire style attribute that contains the inline CSS to be translated.
  2. Right-click and select CSS Styles > Convert Inline CSS to Rule.
  3. In the Convert CSS Inline dialog box, type a class name for the new rule and do one of the following:

    • Specify a style sheet in which the new CSS rule should appear and click OK.

    • Select the document header as the location where the new CSS rule should appear and click OK.

    • It is also possible to convert the rules using the Encoding toolbar. The Encoding toolbar is only available in Code view.


Scroll to Top