Essential rules for coding HTML emails
There are a handful of rules worth following if you want your email to render properly across email clients and look professional while it’s at it:
- Use HTML tables instead of divs and floats. Tables generally render properly in all email clients.
- Define table dimensions and layout with HTML attributes like
width,valignandpadding, which gives you better control. - Use inline CSS in your HTML rather than embedded styles. More email clients understand it.
- Avoid shorthand CSS, like
#000. Some email clients don’t interpret it correctly. - Don’t use Flash or JavaScript. Most email clients won’t run them anyway.
- Go easy on HTML5 and CSS3 features, since a lot of email clients still don’t fully support them.
- Keep the email width under 600px, so it displays correctly on different devices.
- Use email-safe fonts. Here’s a list of compatible fonts. If you use custom fonts, like the ones from Google Fonts, remember to include a fallback.
- Use absolute URLs for images, otherwise they often won’t load.
- Keep the email file size under 100kb, or you risk slow loading and delivery problems.
And then test it
The rules only get you so far. Testing matters just as much, so send your email to as many clients and devices as you can get hold of, and phones especially, since that’s where a lot of people will open it.

If you’d rather not start from scratch, take a look at Tabler Emails, where you’ll find over 80 responsive, customizable templates that have been tested and are ready for mobile.


