Recommendations for building better responsive e-mails
Although some e-mail clients are getting better at rendering e-mails, there are other e-mail clients that are not really as good as they should be. This means that we need to build something basic and progressively enhance it for better e-mail clients.
There are a few guidelines that are important to consider when building responsive e-mails:
- Define the e-mail client with the least CSS and HTML support: Knowing which e-mail client has the least HTML and CSS support will save us unnecessary headaches and time during testing. Again, this is where analytics are crucial.
- Use progressive enhancement: First, design and build for the e-mail client that has the least CSS and HTML support. Then, we enhance the design and experience using that core base.
- Stay within a width of 550px to 600px: This is very important because most e-mail clients have very narrow preview panes. Moreover, 600px or less will look good on desktop clients and web browsers, and the e-mail will remain readable when scaled down or turned responsive on small screens.
- Use tables for layout: Most e-mail clients have nowhere near the same support for HTML and CSS as web browsers, so building layouts with tables is still the way to create e-mails.
- Inline CSS: Many e-mail clients remove the
<head> section of the e-mail, thus anything we put there will be stripped out. So, we need to inline the CSS in order to achieve the necessary styling. - Use system fonts: Although using web fonts is technically possible, it's best to stick to system fonts so the e-mails look as similar as possible across different devices and different e-mail clients. However, if you do decide to use web fonts, go for it and always use them as part of the progressive enhancement process.
- Provide a fallback color for background images: Using background images isn't really that difficult. Outlook is the only client that requires special markup (Conditional Comments) to make it work. However, always provide a fallback background color in case the image doesn't load.
- Always use the alt attribute on images: If images do not load or load too slowly, the e-mail client will show the alternate text. Make sure you put something descriptive in the
alt attribute as well. Instead of Logo, something like Company Logo - Tagline would be ideal. - No need to do mobile-first: Because we're doing progressive enhancement, we are starting with the e-mail client with the least support for HTML and CSS. Hence, this e-mail client very likely doesn't support media queries or the
viewport meta tag. So a mobile-first approach may not be necessarily the best option, at least yet. - Use the HTML5 DOCTYPE: We could certainly use the old HTML4 DOCTYPE, but we can use the HTML5 DOCTYPE as well which is always a good measure.
- Avoid using HTML5 elements: Although we can use the HTML5 DOCTYPE, support for HTML5 elements is practically nonexistent. So avoid using HTML5 elements in e-mails.
- Keep it simple: Most e-mails have a very short lifespan, so making an intricate layout is not really necessary. Create a simple, one-column layout and this will save us a lot of headaches. Focus strongly on the design itself. This is where a solid typographic Modular Scale can work wonders.