Tips and Best Practices for HTML Emails in Outlook 2007, 2010.
While
Microsoft has been making great improvements on the web standards front in IE, they’ve been seemingly rolling backwards with HTML support in Outlook. For the 2007 version they switched from the IE rendering engine to the Word engine (apparently for security reasons), which is completely crippled compared to IE. For anyone who does email marketing and designs and codes attractive HTML emails, this decision has no doubt had you shaking your fist and cursing Bill Gates’ mother.
We were all hoping that for the upcoming Outlook 2010 release Microsoft would go back to IE, but they have announced that they are sticking with Word. The pitchforks and torches are waving, but it looks like we’ll be dealing with the Word engine for emails for many years. Even if they switch to IE for 2012, we’ll have clients using 2007 and 2010 for years. So if you haven’t yet learned the ins and outs of designing emails for Outlook, now’s the time to learn!
Forget all your best practices for CSS – go back to 2001 coding practices for an idea of where your head should be.
Mural does a lot of HTML email work for some of our bread and butter clients, and we literally have thousands of campaigns in our archive dating back many years, so we have a lot of experience testing for lots of different clients and learning the various techniques needed for each. With Outlook 2007 we have our most challenging client, and in general if your email works well in Outlook it’s probably working well everywhere.
Limitations
The first thing you need to understand when designing and coding for Outlook is that the usual rules do not apply. Forget all your best practices for CSS – go back to 2001 coding practices for an idea of where your head should be. Note that some of these things might work in Outlook, but I advise against them because in my experience they do not work consistently, and it’s embarrassing to get an email back from your client asking why it broke when they sent it, so just trust me.
General “best practices” for Outlook 2007:
- Forget about separating content from design with CSS. Build your emails with tables and spacer gifs. No divs. See example below…
- No background images, only background colors. If you want to have HTML text over an image area, you’ll have to make the area behind it a solid color so you can slice it out of the layout.
- You can use basic styles, but use them inline attached to each tag, not in the header. Don’t get fancy – a lot of what works in a browser will not work in Outlook.
- Don’t use padding, only margins. Padding does not work properly.
- Keep your code as simple as possible.
- Optimize your email for ‘images off’ mode, which is likely to be default for your recipients. If you don’t define a height for images, they’ll collapse vertically, moving your text content up. Do specify width though.
Lets take a look at a sample email:

View the HTML version for code.
Lets take a look at the first paragraph of HTML text for an example of how the email should be coded for outlook.

<tr>
<td width=”20″>
<img src=”http://client.muralconsulting.com/neustar/7ways/spacer.gif” width=”20″ height=”1″ border=”0″ alt=”" />
</td>
<td bgcolor=”#ffffff” width=”530″>
<p style=”font: 14px/20px Arial, Helvetica, sans-serif; color: #002765; margin-bottom:10px;”>
<strong>Budgets are tight, yet your customers’ demands for high performance from your online service are growing.</strong> The good news is that you don’t need to spend a lot of money to make your web applications faster… if you know where to look!</p>
</td>
<td width=”20″>
<img src=”http://client.muralconsulting.com/neustar/7ways/spacer.gif” width=”20″ height=”1″ border=”0″ alt=”" />
</td>
</tr>
Note that we’re using tables to define the layout, not css, and we’re reinforcing cells with spacer gifs. All the styling is attached inline to the individual <p> tag itself, and not as a global p. Also note that we’re controlling vertical space with margins, not padding.
While many web designers and coders frown on tools like Dreamweaver for not providing accurate design modes for advanced CSS, Dreamweaver is actually a really good tool for emails, and can display them quite accurately. It was originally designed for building websites before the semantic web was popular, so it does old-school well. It definitely helps when building tables, so don’t be afraid to use it.
Testing your emails
There are three ways to test your emails: Sending it to yourself on a lot of different computers and clients, using a testing service like Litmus, and the ‘send page as email’ trick (Windows/IE only). While I don’t really recommend the former for practical reasons, the latter two are essential.
If you’re using windows and have Outlook on your machine, the quick and dirty way to test is to open your email in IE, and then go to File > Send > Page by email. This will open a new Outlook email and insert the code faithfully into it. Don’t trust the compose view though, send it to yourself, and then you can see how it will appear when it arrives.
If you’re a Mac user, that will not work for you, and you’ll probably want to use a browser testing service that includes email testing. We use Litmus, which lets you test emails in a dozen web and desktop clients to ensure that it works properly. It also lets you test things like the fold, and turning images on and off. It’s expensive, but if you do this a lot it’s worthwhile. HTML clients can have even more compatibility issues than their browser counterparts, and can require just as much testing.
Certainly this is not an exhaustive article about all the ins and outs of Outlook emails, but it should give you a good working foundation. Like anything on the web, you’re bound to find more quirks, but following the guidelines here should get you 90% there.
You can also open the email in Microsoft Word, as Outlook renders the email using word you can see how it renders directly in the program that renders it. This could be helpful for Mac users.
Also in regards to using padding, I actually prefer to use padding than margin as margin can react unpredictably and have found padding to be more reliable to use.
I used to add css inline with the tag, but have found that adding css in the header to work just as well. As you need to define the font for each table you define and even nested tables, by adding css for the tag table in the header defining the font family and color it saves alot of repetitive coding and of course time! but try to limit the css you add in the header to global or repetitive parts such as link colours and table styles.
In my limited experience, if you place CSS in the header rather than inline, some webmail clients (gmail, hotmail) remove all the CSS. In order to get a reasonable display in these webmail clients you need to have inline CSS.
I usually use the font tag for text styling instead of the style attribut inside of a paragraph tag. This should always work. Of course, this will not handle the margins.
[...] 7. Tips and Best Practices for HTML Emails in Outlook 2007, 2010 [...]
[...] 7. Tips and Best Practices for HTML Emails in Outlook 2007, 2010 [...]
Litmus is a very useful site to check your newsletter before you send out!
I also found a site that might help designer to build a newsletter: http://www.email-gallery.com
[...] 7. Tips and Best Practices for HTML Emails in Outlook 2007, 2010 [...]
[...] 7. Tips and Best Practices for HTML Emails in Outlook 2007, 2010 [...]
Hey Brian, i’m read your post and is very interesting, i have been working with emails since 2008, i know that i can give a margin-top:100px but hotmail dont read margin’s only padding’s i know that this is for outlook 2010 but i want to standardize the code
This has been bookmarked on my browsers. lol. I’ve just started doing HTML emails. Any idea how to make bullets in unordered lists show up in Outlook 2010?
@Jason, you can always fake them with a •. I would recommend making a long
in a table (left column for bullet character/image, right column for text).
Thanks man. I was kind of trying to avoid that but it’s looking like thats the case. I had the bullets working in every single of web client (via Litmus) and outlook 2010 has to be the problem child. lol. Appreciate your input.
An explaination of how to implement the template into outlook would have been benefical. A lot of people struggle with that.
I am one of those people Ed….can you point me to where I can learn to insert the HTML email template into outlook 2010. My challenge seems to be the image mapping, I have used many times with Outlook 2007. Can anyone help?
[...] 2007 and 2010 are the most finicky email clients I have ever had to serve, but Brian Scates wrote a great post on how to move past anger and frustration and achieve HTML email [...]
Hello Brian,
Do you have any tips on how to fix a table’s width to 600 pixels? I’ve tried:
I’ve also tried and I get a table with contents much wider than that.
Do you have any ideas as to what needs to be done in order to make it actually be 600 pixels?
Thanks!
You can actually send test emails on a Mac by using Safari and going to File – “Mail Contents of the page”.
Here’s something I’ve struggled with twice now… so hopefully by just writing this it will stick now and I won’t get stung again.
Images need to be the size of the pace you set them to be. I was using a 1px coloured image which I would set in the html to 180px x 6px to create a rule. However in Outlook 2007/2010 it would always show these at about 60px x 6px…
When I make these colour rules as an image sized at 180px x 6px then they appear correctly…
May I never forget this again…
When i sent the newslatter to outlook, hotmail and yahoo. In outlook, it looks okay. But when i see it in yahoo and hotmail. all my text is centralized. can some body tell me? How to standardize the newsletter for all platforms such as yahoo, outlook, hotmail etc
dont know about you but i use outlook better say all my clients test their campaign in outlook and whatever does not work i use this fix. http://www.htmlforemail.com, they take your jpg and do it its workswith outlook all the time
iosdfhvoxvcxb
Great Article.. Thanks
Hi Brian Scates,
Am a Designer, like your stuff, its really very informative and pretty good. I want to design emailers like what you have designed in http://sxates.com/content/webmetricsemail/ can you guide me? Thanks in advance…
[...] 2007 and 2010 are the most finicky email clients I have ever had to serve, but Brian Scates wrote a great post on how to move past anger and frustration and achieve HTML email [...]
can you post how to integrate the custom designed email mailers to my outlook express id
I support this. In fact, I support stripping Word out as well. Leave the flashy stuff to browsers and allow only ASCII email content.
Put in a link to a web page if you want to show people fancy HTML crap.