Email templating crash course
Today I was working on some email templates, I had my beautiful design ready since last week, the only thing left to do was code it and send out some spiffy emails to customers. No problem, a little css and html later, my nifty new email template was ready to use… NOT. It would just look weird in hotmail, parts missing in gmail, would’nt show up at aol… you get the picture.
So I was back in textmate trying out code… these are a few design tips for email design:
- Keep your design as simple as possible
- Don’t use background images
- Embed the necessary css directly to the tags using the style attribute
- Don’t go overboard with div’s
Once I was done with the new, simpler design I had to go back and test around, here are some coding tips you should keep in mind:
- Most email providers strip out everything outside the <body> tag
- Don’t use <style> elements
- Don’t use <link> elements
Provider specific notes:
Gmail
Gmail wont support these css tags: background-image, background-position, background-repeat, bottom, clear, clip, cursor, display, filter, float, font-family, height, left, listy-style-image, opacity, position, right, top, visibility and z-index.
So that practically rules out most of the css you would use to make something nice. This is why my first step was to make something really simple.
Hotmail
They wont support: background-position, border-spacing, caption-side, empty-cells, filter, list-style-position, margin, opacity and position
Yahoo
The soon-to-be-bought provider won’t support the following: background-position, list-style-position and position.
In conclusion, between the three providers we’re ruling out most of the everyday css rules we would normally use, so basically I would recommend using css for a bit of styling and some color here or there but don’t rely on it. (hey, I’m not pusing you into usign tables =P).
My suggestion, as I said earlier, go for something simple, and test it while you’re working on it, beware of email clients too, they don’t speak good css (ahem outlook… ahem).

What I'm up to...
Life in Pictures