= Creating HTML Emails - Tips & Tricks = HTML emails are funny... most modern web browsers fully support standard XHMTL 1.0/CSS2.1 when displaying web pages. Email clients, such as Outlook and Entourage, even in their most recent versions, are not nearly so compliant. Furthermore, many web based email clients strip out a lot of markup before they display HTML emails, which means your carefully crafted design may be bastardized in any number of different ways. Here are a number of tips & tricks that help get things through unmolested. These are current as of April 2010. == Layout Techniques == * **Use tables for layout. Lots of tables.** Table support seems to be pretty solid; support for positioned ''
''s less so. If you're doing something REALLY simple, you might be able to get away with a positioned ''
''. * If you're making a static width email, **make sure it isn't more than 600px wide.** * **Use inline styles, attached to specific tags.** External style sheets are a lost cause, and some web clients, [[http://www.gmail.com/|Gmail]] included, strip out some style declarations made with an inline style sheet (e.g. using the '' (Incidentally, Yahoo Mail does understand inline style sheets, which is why you can use one here even though the advice above says not to use them) ==== Outlook 2007 ==== * In a stroke of pure stupidity, Microsoft decided to switch Outlook 2007 to using the rather broken Microsoft Word HTML rendering engine. The [[http://www.campaignmonitor.com/blog/archives/2007/01/the_truth_behind_the_outlook_2.html|reasoning behind this]] is that Outlook creates HTML email with the Word engine, and they want those emails to display the same way when someone gets them. Unfortunately, this breaks HTML emails for the rest of us. * The Word engine [[http://www.campaignmonitor.com/blog/archives/2007/01/microsoft_takes_email_design_b.html|doesn't support a lot of stuff]], including background images, background colors (in some cases) and padding and margins (in some cases). * You'll definitely want to test your HTML emails in Outlook 2007, and make them look as good as you can. They'll probably never look as good as other clients.