PHP Classes

Inline Style: Apply stylesheets to HTML as tag style attributes

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2010-03-16 (10 years ago) RSS 2.0 feedNot enough user ratingsTotal: 546 All time: 5,443 This week: 314Up
Version License PHP version Categories
inline-style 0.1MIT/X Consortium ...5HTML
Description Author

This class can be used to apply style sheets to HTML as tag style attributes.

It parses an HTML document, finds external or inline style sections, and applies the defined styles to tags that match the defined style selectors to make the tags use style attribute instead.

Innovation Award
PHP Programming Innovation award nominee
April 2010
Number 9

Prize: One book of choice by Packt
CSS stylesheets can be used to define presentation details of elements in pages.

However, in certain cases it is not possible to use external CSS stylesheets to define the page presentation.

That is the case of certain Web mail systems, like for instance Gmail, that discard all stylesheets used in an HTML e-mail message.

This class provides an alternative solution for using CSS stylesheets in HTML e-mail that works even with systems that disable CSS stylesheets in the messages.

It processes the CSS stylesheets and alter the HTML to apply the styles in each page tag setting their style attributes.

Manuel Lemos
Name: Christiaan Baartse <contact>
Classes: 4 packages by
Country: The Netherlands The Netherlands
Age: 33
All time rank: 136339 in The Netherlands The Netherlands
Week rank: 915 Up24 in The Netherlands The Netherlands Up
Innovation award
Innovation award
Nominee: 3x


  Files folder image Files  
File Role Description
Plain text file CSSQuery.php Class Dependency for main class
Plain text file InlineStyle.php Class Main Class

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:5,443
This week:314Up