A web designer about to build their first email: ‘Give me five minutes. I’ll code that in no time.’ Three divs, a float, and a 10px margin later, it starts to sink in: HTML email isn’t that simple.

Ready for a little nostalgia? Proust had his madeleine; we have tables and inline styles. Building an email that looks right across email clients is a little like making a good traditional dish – as French baking writer Mercotte might appreciate:
- A few simple, reliable ingredients.
- Some old-school HTML and CSS.
- Taste, taste, and taste again before serving.
After the SEO recipe, here is the email recipe. Now for the painful practical part. We’ll leave the aprons to the experts.
1. CSS styles
Start by looking at Campaign Monitor’s useful table showing which CSS properties each email client supports:

Some email clients at the time ignored the <head> section or external stylesheets. My recommendations were therefore:
- Don’t rely on styles in the <head>, which some webmail clients strip out. Start the email markup after the <body> tag.
- Use inline CSS. Tools such as Premailer can convert stylesheet rules into inline styles.
- Prefer longhand properties to CSS shorthand, as in this example.
Avoid:
<p style=”font:bold Arial, Helvetica, sans-serif 12px”>Text…</p>
Prefer:
<p style=”font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold;”>Text…</p>
2. Paragraphs and links
The <p> tag is supported by email clients, but I preferred markup with as little default styling as possible. That is why I used <span> elements instead. For precise spacing, I set the line height on the <td>:
<td width="350" style="font-weight:bold; font-size:12px; line-height:16px; font-family: arial;">Example text</td>
To make links look consistent across email clients, I applied the styles first to the <a> tag and again to a <span> inside it:
<a href="http://www.tonsite.fr/" style="color:#cccccc"><span style="color:#cccccc">Styled link text</span></a>
3. Tables
Clients such as Gmail, Outlook 2000/2007, and Lotus Notes had uneven support for floats, margins, and padding. I used <table> layouts rather than <div> layouts, following these guidelines:
- Create a full-width container <table>.
- Set the cell’s background color with bgcolor on the
<td>, rather than relying on style=”background-color”. - Set the width on each <td>, rather than only on the
<table>. - Use cellpadding on the
<table>instead of padding on each<td>. - Use separate cells for spacing rather than relying on padding or margins at the edges of a
<td>. - Leave off the px unit in HTML width attributes: use
width="95". - Keep nested tables to no more than five levels where possible.
- Colspan was widely supported, while rowspan was less reliable. Suppose you have a 250px-tall image on the left and want 50px of space above 200px of text on the right. You can place a nested
<table>in the second cell, with two<tr>rows: one for the 50px space and one for the text.
Example structure:
<table><tr><td>Column 1</td>
<td>
<table><tr><td>Column 2, row 1 of 2</td></tr>
<tr><td>Column 2, row 2 of 2</td></tr></table>
</td>
</tr></table>
4. Images
Because email clients may block images by default, aim for a balance of text and images. Place a text-based call to action within roughly the first 250–350px of the email.

- Avoid spacer images used solely to create empty space.
- Specify the images’ actual dimensions.
- Remember to provide alt text.
- For compatibility with the clients covered here, avoid transparent GIF and PNG images.
- Avoid relying on background images; Outlook 2007 and Lotus Notes did not support them in the same way as browsers.
- Don’t use floats. Use alignment attributes such as
align="right"instead. - Set display:block; on images to prevent the white gaps that Gmail and Hotmail could introduce, as shown above.
Example:
<img src="image.jpg" align="top" style="display:block;" alt="Image">
5. Test, test, and test again

There is only one way to find out whether your email displays correctly in the clients you care about: test it.
If you know which email clients your subscribers use, prioritize those. If you don’t, start with what you know about your audience.
If your subscribers are consumers, test the webmail services. If you’re emailing a business audience, pay particular attention to desktop email software. The examples I used at the time were Gmail, Hotmail, Orange, Outlook, Thunderbird, Eudora, Lotus Notes, and AOL. And don’t forget mobile devices, including the BlackBerry, Android, and iPhone clients of the time.
Services such as Litmus and Email on Acid can help with testing. Without one, you’ll need a little more patience.




