Extracting inline CSS from HTML Purifier voodoofied: Assigning semantics to elements Sander Tekelenburg brought to my attention the poor programming style of inline CSS in HTML documents. In an ideal world, we wouldn't be using inline CSS at all: everything would be assigned using semantic class attributes from an external stylesheet. With ExtractStyleBlocks and CSSTidy, this is now possible (when allowed, users can specify a style element which gets extracted from the user-submitted HTML, which the application can place in the head of the HTML document). But there still is the issue of inline CSS that refuses to go away. The basic idea behind this feature is assign every element a unique identifier, and then move all of the CSS data to a style-sheet. This HTML: