Recipe 7Creating an HTML Email Template

Problem

Building HTML emails is a bit like traveling back in time—a time before CSS, when everyone used tables for layout and <font> tags reigned supreme. A lot of the best practices we’ve come to know and love aren’t usable in HTML emails, because the email readers don’t handle them. Testing a web page on multiple browsers is easy compared to the amount of testing we have to do when we create an email that will be read in Outlook, Hotmail, Gmail, or Thunderbird, not to mention the various mail applications on mobile devices.

But our job isn’t to complain about how difficult things are going to be; our job is to deliver results. And we have a lot of work to do. Not only do we need to produce readable HTML ...

Get Web Development Recipes, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.