HTML Email That Works Everywhere: Gmail, Outlook and Apple Mail
Why HTML emails break in some inboxes, which CSS features cause the most trouble, and how to check and fix your code before you hit send.

Building a web page and building an email look like the same job. Both use HTML and CSS, and both are viewed on phones and desktops. In practice they are very different, because an email is opened by dozens of mail apps, each with its own rendering engine and its own idea of which code is safe. A layout that looks perfect in your browser can arrive in an Outlook inbox as a single column of stretched images with the wrong font.
Why email is different
Mail apps strip or rewrite code for security and for their own layout. Gmail removes some CSS and renames classes. Outlook for Windows renders email with the engine from Microsoft Word, which has never supported much of modern CSS. Apple Mail is close to Safari and supports nearly everything. Webmail clients such as Yahoo sit somewhere in between. On top of that, the same brand of client can behave differently on the web, on iOS and on Android.
The usual suspects
A handful of features cause most of the trouble.
Flexbox and grid are the first. They are the normal way to build columns on the web, but Outlook for Windows ignores them, and support elsewhere is uneven. Tables with role=presentation remain the dependable way to place content side by side in email.
Background images are next. They work in most clients, but Outlook for Windows needs a separate VML block inside a conditional comment. Always set a background colour so text stays readable if the image fails.
Web fonts, CSS variables, animation, positioning and inline SVG work in Apple Mail and very few other places. Use them only as enhancements, with a safe fallback underneath.
Even small details matter. Outlook ignores max-width, so wrap the email in a fixed-width table for it. Images without a width attribute can appear at their full pixel size. Padding on div elements is often ignored, so put padding on table cells.
Checking your code
Paste your email into the HTML Email Compatibility Checker and it lists every risky feature it finds, with the line numbers and a Yes, Partial or No for Gmail, Outlook for Windows, Outlook.com, Apple Mail and Yahoo. Each client gets a score, so you know where to look first, and each feature comes with a safer alternative. A second tab checks the basics that affect every client: missing alt text, relative image paths, http links, missing unsubscribe links and a total size close to the point where Gmail clips the message.
Fix in order of impact
Start with anything that breaks the layout in a client your audience uses heavily. For many business lists that means Outlook. Rebuild columns as tables, add widths to images and wrap the content in a fixed-width container for Outlook. Next, make sure the email reads well with images turned off: alt text on every image, real text for headlines and buttons, and a background colour behind any background image. Then trim the size. Long emails get clipped in Gmail, which hides the footer and the unsubscribe link.
Leave decorative features such as rounded corners and shadows in place. They simply disappear in clients that do not support them, which is fine.
Accessibility helps deliverability
Many accessibility basics also make email more robust. A lang attribute helps screen readers choose the right voice. role=presentation on layout tables stops them from announcing rows and columns. Good alt text helps everyone who has images blocked. Clear live text instead of text baked into images also helps spam filters understand the message.
Test before you send
A checker catches known problems, but mail apps change, and some issues only appear with real accounts. Send test emails to the clients your audience uses most, on both desktop and phone, and look at them in dark mode as well. Keep a short checklist and repeat it for every template change.
With a table-based layout, inline core styles and a few fallbacks, an email can look good almost everywhere. The trick is to find the fragile parts before your subscribers do.



