
Email Client Rendering Masterclass
Email HTML is not web HTML, and the difference catches out even experienced developers. A message can look polished in one app and fall apart in another, because the mail clients that subscribers use run on different rendering engines and support different features. Some of the most widely used clients still interpret CSS in ways that would have looked dated on the web a decade ago. The good news is that most rendering problems come from a short list of causes, and most of them have straightforward fixes.
This masterclass covers why clients behave differently, the coding practices that keep a design intact across them, the testing you need before each send, and the specific problems you are most likely to meet, with the fix for each. It is written for the person who builds the template, not only the person who approves it.
To render reliably across email clients, use table-based layouts, inline CSS, explicit widths and web-safe fonts. Build a single-column design first, then enhance it for clients that support more, and test the core matrix before every campaign.
Why email rendering is different
Web browsers share a small number of rendering engines, and developers can rely on a broad set of standards. Email clients do not share an engine. Some use WebKit, the engine behind Safari, and support modern properties reasonably well. Others use the rendering engine of Microsoft Word, which was built for documents, not layouts, and which is why Outlook on Windows has been the persistent challenge for email developers for two decades. Gmail uses a modified WebKit with its own restrictions, and some webmail clients run on older engines still.
The practical consequence is that you cannot design for the web and hope for the best. You design for the most restrictive client that matters to your audience, then add enhancements for the clients that can handle them. The rest of this article is built on that principle.
Build with tables and inline styles
Table-based layout remains the most reliable structure for email. Every client supports it, and it gives you predictable control over width, spacing and column behaviour. Keep nesting shallow, ideally no more than three or four levels, because deep nesting makes the template fragile and slow to edit. Flexbox and grid are better for the web, but their support in email clients is inconsistent, so treat them as enhancements rather than foundations.
Inline styles are the other half of the foundation. Many clients strip the <style> block in the head of an email, which means any styles placed there may disappear without warning. Put the styles directly on each element instead, so that the design survives whichever client renders it.
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 24px;">
Your content here
</td>
</tr>
</table>
Set explicit widths on tables, cells and images. Automatic sizing behaves differently in every client, and an explicit width removes a whole category of surprises. A content width of 600 to 640 pixels is the common, safe choice, because it fits most desktop previews and works with a fluid single column on phones.
Images, fonts and spacing
Images need three things: a width, a height and descriptive alt text. Alt text matters for accessibility, and it also appears in the places where images are blocked, which is common. Add display: block to images to remove the small gap that Outlook adds beneath them, which is one of the most visible and most frequently reported rendering problems.
Fonts require a similar discipline. Web fonts loaded through a link or an import often fail to load in email, so the layout has to work with a system font. Choose Arial, Helvetica, Georgia or Verdana, and always provide a complete fallback stack. Designs that depend on a specific typeface look broken as soon as the fallback appears, so test the fallback deliberately rather than assuming it will be fine.
The problems you will meet
Most rendering bugs fall into a few families, and recognising the family speeds up the fix. Spacing bugs, such as the gap under an image, usually come from inline element defaults and are solved with display: block. Missing styles usually come from a <style> block that was stripped, and the fix is to move the rules inline. Background colours that disappear in Outlook need a bgcolor attribute on the table as a fallback, since Outlook ignores some CSS backgrounds. Layouts that collapse into a single column in Outlook need conditional comments, because Outlook does not support the properties that create the two-column layout.
Clipping is the problem that most often goes unnoticed until it costs money. Gmail clips messages larger than roughly 102 KB, showing a "View entire message" link in place of the rest of the content. The clipped part often contains the unsubscribe link and the postal address, which are legal requirements, so clipping is a compliance issue as well as a design one. Keep the HTML lean, remove unused code and check the file size before every send.
Media queries deserve a clear warning. They work in Apple Mail and in Gmail on the web, but Outlook ignores them. Use a mobile-first approach in which the single-column layout is the default and wider layouts are applied only to clients that support them. Never rely on a media query for anything critical, such as the main call to action.
<!--[if mso]>
<table align="center" width="600" cellpadding="0" cellspacing="0" border="0"><tr><td>
<![endif]-->
<table align="center" width="600" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="300" valign="top">Left column</td>
<td width="300" valign="top">Right column</td>
</tr>
</table>
<!--[if mso]>
</td></tr></table>
<![endif]-->
The conditional comments above let Outlook render the fixed-width layout it understands, while other clients see the standard markup. The principle generalises: wrap the Outlook-specific structure in conditional comments so that the design degrades gracefully rather than breaking.
Testing before every send
Testing is where most teams save or lose the most time. Test every template in at least the core matrix: Gmail on the web, Gmail on iOS, Apple Mail on macOS or iOS, Outlook on the web, Outlook for Windows, and Yahoo Mail. Add Android clients and older Outlook versions if your audience uses them, and check your analytics to see which clients are most common among your readers.
Check layout, fonts, image sizes, colours and link behaviour in each client. Look at the email in both light and dark mode, because clients invert colours differently. Confirm that buttons are large enough to tap, with a minimum of about 44 pixels on mobile. Document any client-specific issue you find, so the next template can avoid it from the start. Most ESPs provide test sends, and a preview tool can catch many layout problems quickly, but test sends to real apps catch the issues that matter most, including dark mode and clipping.
A reference workflow
A reliable workflow runs in order. Code the email using the principles above, then send test emails to each client in the matrix. Check the elements that most often break, including layout, images, fonts and buttons. Record any problem and its fix in a shared document. Iterate until the matrix is clean, then do one final review of the file size and the footer before the send is approved. Templates that go through this workflow once tend to be reliable for a long time, because the fixes are built in rather than rediscovered each campaign.
For the design side of this work, see the email design trends guide, and for how dark mode affects your colour choices, see the dark mode design guide. For the structure of a complete email, see the email anatomy guide.
Rendering is never fully solved, but it becomes predictable. Build with tables and inline styles, test the matrix every time, and treat each new problem as something to record so it never surprises you twice.
Key Takeaways
- Use table-based layouts with inline CSS, because style blocks are unreliable across clients.
- Set explicit widths and display:block on images to avoid spacing bugs.
- Build single-column first, then enhance for clients that support it.
- Test the core matrix (Gmail, Apple Mail, Outlook desktop and web, Yahoo) before every campaign.
- Keep the HTML small enough to avoid Gmail clipping.
Related Reading
Frequently Asked Questions
Preview tools catch most layout problems. Test sends catch the rest, especially dark mode, font substitution and clipping, so use both.
Basic properties, such as colours, fonts, margins and padding, work almost everywhere. Grid and flexbox are unreliable in Outlook, so use them only as enhancements on top of a working fallback.
Start with the six in the core matrix, then add the clients that your own analytics show your readers using.
Gmail clips messages larger than about 102 KB and shows a "View entire message" link. Keep the HTML lean, remove unused code and check the file size before every send.
Use Arial, Helvetica, Georgia or Verdana with a full fallback stack. Web fonts often fail to load, so the fallback must still look right.
Was this useful?