Tiffany B. Brown

Link dump: Sept 7, 2006 – Using CSS and HTML in email

A round up of posts and articles about using CSS with HTML in email, with varying degrees of crustiness.

The big ol’ pitfall in using CSS in HTML emails is two-fold:

  • There are scads of different e-mail clients.
  • CSS support, if it exists, is usually quirky.

Using CSS in email is possible, though. I’ll distill the best advice into four points:

  • Use simple HTML. Go for 3.2 or HTML 4.1.
  • If appearance is your primary concern, use tables for layout. You can use the div element. Just be aware that your users may receive linearized text instead of your floated div goodness.
  • Use highly-specific selectors. Give that wrapper div or that table an id. Use elements and ids or classes as selectors (example td.main).
  • Use inline styles. For the greatest level of consistency, use inline styles. Yes it sort of defeats the purpose of using CSS.

Oh, and by all means, make your CSS embedded (included in the HTML file), not linked.

Related content on this site

Comments are closed.