CSS Support in Email Clients: What Works Where
CSS support in email clients explained: what Gmail, Outlook and Apple Mail keep, why Gmail drops your CSS, and the fallbacks that keep layouts intact.
6 min read

On this page
CSS support in email clients is much narrower than in browsers, and it differs from client to client. Apple Mail supports nearly all modern CSS, Gmail accepts a documented subset and strips the rest, and classic Outlook for Windows renders email with Microsoft Word and ignores much of it. The approach that holds up everywhere is tables for layout, inline styles for anything the email needs, and a <style> block only for extras such as mobile tweaks and dark mode.
Why does CSS work differently in email?
An email client isn't a browser. It shows HTML from strangers inside its own interface, so it removes anything that could break out of the message area or track the reader: positioning, scripts, external files. It also rewrites class names and adds its own styles. Each vendor decides what to allow, nobody follows a shared standard, and you can't use JavaScript to detect the client and adapt.
So writing CSS for email means asking "what does each client keep?" rather than "what does CSS support?".
Inline styles or a style block: which clients support what?
Most clients read a <style> block in the <head>: Apple Mail, Outlook.com, the Outlook apps for Mac, iOS and Android, Yahoo Mail, Samsung Email and classic Outlook for Windows. The exceptions matter:
- Gmail (web, Android and iOS with a Google account) reads
<style>only inside the<head>and removes blocks placed in the<body>. - The Gmail app with a non-Google account (Outlook, Yahoo or any IMAP, POP or Exchange account added to the app) removes
<style>blocks and media queries completely. Only inlinestyleattributes survive.
Media query support is patchier still. Apple Mail supports them fully. Gmail supports screen and all queries on width, device-width, orientation and resolution, nothing else. Outlook.com and the Outlook mobile apps support them but not nested queries. Classic Outlook for Windows ignores media queries entirely.
My rule on every build: anything the email needs to be readable (fonts, colours, widths, padding) goes inline, and the <style> block only holds enhancements. I write the CSS in a style block while building, then inline it before sending. A CSS inliner for email does that and keeps your media queries in the head.
Gmail CSS not working? The usual causes
When Gmail ignores your CSS, the cause is almost always one of these:
- The style block is in the body. This usually happens when CSS is pasted into a content block in an email builder. Move it into the
<head>. - One syntax error. A missing brace or semicolon makes Gmail discard the entire
<style>block, not just the broken rule. - Modern syntax Gmail can't parse.
:is(),:where(), range media queries like(width >= 500px), and space-separated colours likergb(0 0 0 / 50%),oklch()orcolor-mix()also discard the whole block. Inline, a space-separated colour removes the element's entirestyleattribute. Usergb(0, 0, 0)and(max-width: 600px). - Too much CSS. All
<style>blocks together can't exceed 16,384 characters. The block that crosses the limit, and every block after it, is dropped. - Unsupported properties. Gmail removes them one by one:
position,z-index,flex,justify-content,gap,box-shadow,transformand custom properties, plus negative margins. - Unsupported selectors. Only
:hoversurvives among pseudo-classes (and not on iOS), only[class~="value"]among attribute selectors, and pseudo-elements like::beforeare removed. - The reader's account isn't a Google account. In the Gmail app, that means inline styles only.
- The email was pasted, forwarded or printed. Pasting HTML into Gmail's compose window removes the
<head>and<style>. Replies, forwards, printing and "View entire message" on a clipped email keep only inline styles.
Google documents all of this on its Gmail CSS support page at developers.google.com, which is worth bookmarking.
Outlook CSS support: classic Outlook vs the rest
"Outlook" covers very different engines. Outlook.com, the new Outlook for Windows (which renders much like Outlook.com) and the Outlook apps for Mac, iOS and Android handle style blocks, media queries and even flexbox.
Classic Outlook for Windows uses Word's engine, and its limits shape every email layout:
max-widthis ignored (newer versions apply it to tables only), so widths go inwidthattributes.- Padding is reliable only on table cells, and margins are partial (
autodoesn't work). - No
border-radius,float,remunits or media queries. - CSS background images and gradients need VML.
- Font weights below 600 render as normal and 600 or above as bold.
I cover the Word-engine fixes themselves (ghost tables, line-height, VML buttons) in my guide to Outlook rendering, so I won't repeat them here.
Which CSS properties should you avoid in email?
- Flexbox and grid. Gmail keeps
displaybut stripsflex,grid,justify-content,align-itemsandgap, so the layout falls apart. Classic Outlook ignores them. Use tables for columns. - position, top, left, z-index. Removed by Gmail and ignored by classic Outlook. Overlapping layouts need a different design.
- float. Ignored by classic Outlook. Use the
alignattribute on a table or image instead. - CSS variables. Not supported in Gmail, Outlook.com or classic Outlook. Write literal values.
- box-shadow. Not in Gmail on the web or classic Outlook. Treat it as decoration you can lose.
- Background gradients. caniemail lists
linear-gradient()as working in Gmail, Apple Mail and Samsung Email, but not in classic Outlook, Outlook.com, the Outlook apps or Yahoo Mail. Always set a solid colour first.
Here is the gradient pattern I use. The bgcolor attribute and background-color give every client a solid colour, and clients that understand the gradient paint it on top:
<td bgcolor="#1d4ed8" style="background-color: #1d4ed8; background: linear-gradient(90deg, #1d4ed8, #7c3aed); padding: 32px; color: #ffffff; font-family: Arial, sans-serif;">
The new collection is live
</td>I use the background shorthand rather than background-image on purpose: Gmail for Android has a known bug that breaks gradients written inline in background-image.
What CSS is safe in almost every email client?
This set works in all the major clients, classic Outlook included:
- Tables with
width,cellpadding,cellspacingandalignattributes background-color(backed bybgcolor) andcolorfont-family,font-sizeandline-heightin pixels (classic Outlook needsmso-line-height-rule: exactlyto honour line-height precisely)font-weightas normal or boldtext-alignandtext-decorationpaddingandborderon table cells (classic Outlook caps borders at 8px)border-radius, which simply shows square corners in classic Outlook
Build the email from these, then add everything else as progressive enhancement that can fail without breaking the message.
How to check CSS support before you send
Look the property up on caniemail.com. Each feature page lists support per client and version, and the numbered notes hold the real detail, such as "not supported with non Google accounts". Check the test date too: some entries are years old.
Then send real tests to the inboxes your audience uses, including the Gmail app with a non-Google account and classic Outlook. This cross-client checking is part of every HTML email template I code, because a property that works in one inbox tells you nothing about the next.
FAQ
Does Gmail support CSS in the head?
Yes. Gmail on the web, Android and iOS reads <style> blocks in the <head> for Google accounts, within its limits on size, syntax and supported properties. The Gmail app removes them when the account is not a Google account, so essential styles must be inline.
Does Outlook support media queries?
Outlook.com, the new Outlook for Windows and the Outlook apps for Mac, iOS and Android support them, except nested queries. Classic Outlook for Windows ignores them, so the desktop layout has to work at a fixed width without any media query.
Can I use flexbox in HTML email?
Only as an enhancement. Apple Mail and Outlook.com handle it, but Gmail strips the flex properties and classic Outlook ignores them. Tables remain the reliable way to build columns.
Is linear-gradient supported in email clients?
Partly. It works in Gmail, Apple Mail and Samsung Email, but not in classic Outlook, Outlook.com, the Outlook apps or Yahoo Mail. Put a solid background-color before the gradient so those clients still show a colour.
Key takeaways
- Inline every style the email needs; keep the
<style>block for enhancements only. - Gmail drops a whole style block on one syntax error, modern syntax or more than 16,384 characters.
- Classic Outlook for Windows ignores max-width, border-radius, float, gradients and media queries.
- Check each property on caniemail.com and give every modern effect a fallback.
Tags
- HTML Email
- CSS
- Outlook Compatibility
- Email Development

About Keshur Gojiya
Web developer and HTML email specialist with 6+ years of experience, building websites and emails for businesses, startups and agencies.
Get to know me

