Menu

Email CSS support by client, and what to do when a property is not supported

CSS rules for display, flex and box-sizing on a dark code editor screen
Photo: Bibek Ghosh, Pexels

Email CSS support is the set of CSS properties each email client applies when it displays a message, and it varies far more than it does between web browsers. Inline styles work in every major client; a <style> block in the head works almost everywhere, with limits in Gmail; modern layout such as flexbox and grid works in most clients but not in classic Outlook for Windows; and position, CSS variables and web fonts are unreliable enough that you should never depend on them.

The table below covers nineteen properties and techniques across seven client families, each row linked to its source, followed by the fallback code to write when a property fails and rendered examples whose captions say what they simulate.

A grid of twelve CSS features against twelve email clients, each cell green for yes, amber for partial or red for no. Classic Outlook for Windows is red for almost every row except the style element and web fonts, which are partial. Apple Mail on Mac and iOS Mail are green in every row except position, which is partial. Gmail on the web is red for prefers-color-scheme, web fonts, position and CSS variables. CSS variables are red everywhere except Apple Mail, iOS Mail and Samsung Email.
Generated from Can I email's data file (updated 16 September 2026), using each client's latest test. Classic Outlook for Windows shows its weakest result across versions 2007 to 2019. Amber hides a condition, so read the table below before relying on one.

Where the CSS can live: inline, embedded or linked

There are three places to put CSS in an email, as the HTML email guide sets out, and clients treat them very differently.

  1. Inline, in a style attribute on each element. This is the baseline. Microsoft’s reference for the Word engine that classic Outlook uses lists the style attribute on nearly every element it supports, and Can I email’s note for !important in the Gmail apps reads “Only supported inline when using a Non Gmail Account due to the lack of <style> support”, which tells you inline styles are what survives there. Everything that must survive (widths, colours, padding, fonts, button styles) goes here.
  2. Embedded, in a <style> element in the <head>. Supported in every major client, with conditions. Can I email records that Gmail does not support it “inside the <body>”, that “the size of the <style> tag is limited to 16 KB”, and that the Gmail apps do not support it “with non Google accounts”. Classic Outlook supports it, but “<style> elements need to be declared before their rules are used”. This is where media queries, dark mode rules and hover effects live.
  3. Linked, with <link rel="stylesheet"> or @import. Avoid, except a font <link> hidden from Outlook, added as an enhancement. Can I email records no support for <link> in Gmail, Outlook.com, Outlook for Mac, iOS or Android, Yahoo or Samsung Email; @import fails in the same clients. Only Apple Mail and classic Outlook for Windows read them.

So the working pattern is: write your CSS in classes while you build, then run an inliner that copies every rule onto the elements, and keep a small head block for what cannot be inlined. Frameworks do this step for you; email frameworks compares how MJML, Maizzle and Foundation for Emails inline, and the MJML tutorial shows the output.

Email CSS support table, client by client

Each property links to its Can I email feature page, which shows every version tested, the test date and the full notes. The Docs column links the client’s own documentation where it covers the property. “Outlook.com” is Can I email’s column for Outlook on the web; the new Outlook for Windows is not tested separately, but Microsoft says its “experience is provided by Outlook on the web”, so treat the Outlook.com column as the closest guide for it. The classic Outlook column means Classic Outlook for Windows (2007 to 2019 in caniemail’s tests; 2021, 2024 and Microsoft 365 use the same Word engine).

Email CSS support table, client by client
Property Gmail Classic Outlook for Windows Outlook.com Outlook Mac, iOS, Android Apple Mail, iOS Mail Yahoo Mail Samsung Email Docs
Inline style attribute Yes Yes Yes Yes Yes Yes Yes Word engine
<style> in the head Partial: head only, 16 KB; apps not for non-Google accounts Yes, declare before use Yes Yes Yes Yes Yes Gmail
<link> stylesheet No Yes No No Yes No No
@media queries Partial: no height queries; apps not for non-Google accounts No Partial: no nesting Partial: no nesting Yes Partial: screen, width and height only Partial: not with Hotmail or Outlook accounts Gmail
prefers-color-scheme No No Yes, adds data-ogsc attributes (Can I email; Litmus reports no, so test) Yes Yes No Yes, from 6.1
display:flex Web yes; apps Google accounts only No Yes Yes Yes Yes, but not inline-flex Yes
display:grid Web yes (March 2026 test); apps Google accounts only No Yes Yes Yes Yes (March 2026 test) Yes
max-width Yes No in 2007 to 2016; 2019 on tables only Yes Yes Yes Yes Yes Word engine
background-image Yes (a July 2023 Gmail web test removed the whole style attribute when url() was present; yes again in August 2023) No, use VML Yes Yes Yes Partial: one value only Yes Gmail, Word engine
border-radius Yes No, use VML roundrect Yes Yes Yes Partial: no / shorthand Yes Gmail
@font-face web fonts No (Roboto and Google Sans only) Partial: remote fonts ignored; in versions 2007 to 2016 text can fall back to Times New Roman No No Yes No Yes, not with Microsoft addresses
:hover Web yes; iOS no; Android Google accounts only No Partial: type selectors only Mac partial; iOS no; Android yes Yes Yes Yes
position No No Partial: sticky only Mac and Android sticky only; iOS no Partial: relative and absolute Partial: relative only Partial: relative and absolute Word engine
CSS variables No: var() kept, declarations removed No No No Yes No Yes (6.0 and 9.0 tested)
margin Partial: no negative values Partial: no auto, no negatives, not on span or body Partial: no negatives Partial: no negatives Yes Partial: no negatives (October 2024 test) Yes Word engine
padding Yes Partial: table cells only; vertical padding equalised across a row Yes Yes Yes Yes Yes Word engine
!important Partial: lowercase only; apps inline only for non-Google accounts Partial: needs a space before it; not inline Yes Yes Yes Partial: dropped without a space before it on background-image Yes
box-shadow Web no; apps non-Google accounts only No Yes Yes Yes No Yes
linear-gradient() Yes; Android not inline in background-image No, VML gradient fill instead No No Yes No Partial: not with Hotmail or Outlook accounts

Two of the client documents add detail worth knowing. Google’s Gmail CSS page lists display, border-radius, max-width and background-image among the supported properties, says “Gmail supports class, element, and ID selectors”, and that it “supports queries against screen width, orientation, and resolution”. It does not list position or @font-face, which agrees with Can I email. Microsoft’s Word engine reference lists background-image, max-width, position, float, min-width and text-shadow among the CSS it treats as “unknown properties”, and supports padding, width and height only on some elements, such as tables, table cells and images.

What each row means in practice

Layout: flexbox, grid, max-width and position

Flexbox and grid now work in every client in the table except classic Outlook for Windows and Gmail’s apps on non-Google accounts. That would make them usable if classic Outlook were rare, and for many lists it is not; your platform’s client report tells you. Where it matters, build the columns in a table and keep flexbox for details whose loss leaves the layout intact. Responsive email builds a layout that stacks on phones without relying on either.

max-width is the property behind every fluid email container, and classic Outlook ignores it on everything except tables in version 2019. The standard fix is a fixed-width table that only Outlook sees, shown in the next section. Email width explains how wide that container should be.

position is the one to give up on. Of the clients in the table, only Apple Mail, iOS Mail and Samsung Email support absolute (Thunderbird does too in Can I email’s tests), and neither Gmail nor classic Outlook supports any value. To layer text over a picture, use a background image on a table cell; email background image has the version with Outlook’s VML.

Visual: background images, rounded corners and fonts

background-image and border-radius work everywhere except classic Outlook, and Can I email’s notes for both point to VML, Microsoft’s drawing markup that Word does understand, as the Outlook route. HTML email button has a rounded VML button, and email background image a VML background, each explained line by line.

Web fonts are the weakest row that people still try. Of the clients in the table, only Apple Mail, iOS Mail and Samsung Email (not with Microsoft addresses) support @font-face (Thunderbird does too in Can I email’s tests). Classic Outlook is worse than a plain no: Can I email notes that in versions 2007 to 2016, elements using a declared web font “ignore the font stack and fall back to Times New Roman”. So hide web font declarations from Outlook with <!--[if !mso]><!--> and <!--<![endif]-->, and add an [if mso] rule that sets Arial everywhere:

<!--[if !mso]><!-->
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
<!--<![endif]-->
<!--[if mso]><style>body, table, td, th, div, p, a, li, span, h1, h2, h3, h4, h5, h6 { font-family: Arial, Helvetica, sans-serif !important; }</style><![endif]-->

Can I email also lists mso-generic-font-family and mso-font-alt for controlling the fallback; treat them as a backup to the rule above, not the fix. Web fonts in email has the full setup.

Interaction and theme: hover, dark mode and variables

:hover works in the desktop clients that matter except classic Outlook, and only on type selectors such as a:hover in Outlook.com and Outlook for Mac. Touch screens have no pointer to hover with, so treat it as decoration, and use the checkbox technique of kinetic email for effects a reader taps.

prefers-color-scheme is honoured by Apple Mail, the Outlook apps, Outlook.com (Can I email; Litmus reports no, so test) and Samsung Email, and by no Gmail client. Outlook.com also marks recoloured elements with data-ogsc and data-ogsb attributes you can target. Email dark mode has the full set of rules and what each client does with no dark mode code at all.

CSS variables fail almost everywhere. Gmail keeps the var() function but removes the declarations, which is the worst combination: the value has nothing to resolve to unless the var() carries its own fallback. Of the clients in the table, only Apple Mail, iOS Mail and Samsung Email support them (Thunderbird does too in Can I email’s tests).

Media queries

Most clients read @media with conditions: Gmail supports the width, orientation and resolution queries Google lists but not height, Yahoo only screen with width and height, and the Outlook apps drop nested queries. Classic Outlook for Windows reads none, so a layout that only works once a media query applies is broken there. Build the desktop layout so it is correct with no media query, and use the query to adapt it for phones.

What to do when a property is not supported

An email client that does not support a property usually ignores it, as a browser does with an unknown property, and keeps going. Every technique below uses that: write something every client understands, then add the better version for the clients that can use it.

1. Put a plain fallback before the enhanced value

When a client drops a declaration, the one before it still applies. That is the safest pattern for CSS variables, gradients and any newer value:

<td style="background-color:#ff7a1a; background-color:var(--brand, #ff7a1a); border-radius:6px;">
  <a href="https://example.com/sale" style="display:inline-block; padding:12px 20px; color:#ffffff; font-family:Arial, sans-serif; font-weight:bold; text-decoration:none;">Shop now</a>
</td>

The first background-color is a plain hex value every client reads. The second uses var() with a fallback inside it: MDN documents that “an optional second argument to the function serves as a fallback value”, used when the custom property has no usable value. A client that does not understand var() drops the second declaration and keeps the first. Gmail, which keeps var() but removes the declarations, resolves it to the fallback inside the brackets, so the colour holds there too. The bgcolor attribute is another layer some developers add for classic Outlook.

Three versions of an orange Shop now button. The first two, with a plain hex background declared before the var() value, show an orange button whether or not the client reads variables. The third, with only var() for the background, shows white text on no background, so the button disappears.
A browser render, with the client that drops variables simulated by leaving out the declaration it would remove. With the plain value first, losing the variable costs nothing.

2. Build layout in tables and add flexbox or grid on top

Tables are the layout every client in the table draws, classic Outlook included. Write the columns as table cells with widths, and use flexbox or grid only inside a cell, for an arrangement that can fall back to stacked blocks without harm:

<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td width="33%" valign="top" style="padding:0 8px 0 0;">Card 1</td>
    <td width="33%" valign="top" style="padding:0 4px;">Card 2</td>
    <td width="33%" valign="top" style="padding:0 0 0 8px;">Card 3</td>
  </tr>
</table>
Three versions of a row of three product cards. In the first, display flex lays them side by side. In the second, the same code with display flex ignored stacks the cards as three full-width blocks. In the third, a table with three cells keeps them side by side without flex.
A browser render. The middle panel uses display:block in place of display:flex, which is what a div falls back to in a client that ignores flex. The table version needs no support to hold its columns.

3. Give classic Outlook its own code in conditional comments

Classic Outlook reads conditional comments that every other client treats as ordinary comments. The common use is a fixed-width table around a fluid container, because Outlook ignores max-width:

<!--[if mso]>
<table role="presentation" width="600" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td>
<![endif]-->
<div style="max-width:600px; margin:0 auto;">
  <!-- the email -->
</div>
<!--[if mso]>
</td></tr></table>
<![endif]-->
  • <!--[if mso]> opens a block that only Microsoft Office’s Word engine reads. Every other client sees a comment and skips it.
  • The table with width="600" and align="center" gives Outlook a fixed, centred column, since it ignores the max-width on the div and, per Can I email, does not support margin set to auto either.
  • The div with max-width:600px is what everyone else uses: full width on a phone, 600 pixels at most on a desktop.

The same mechanism carries VML for buttons and backgrounds, and the Arial rule that keeps fonts safe. Outlook rendering issues collects the other Outlook-only fixes, and email template for Outlook has a full template built this way.

4. Let enhancements fail quietly

Some properties only decorate: rounded corners, hover colours, shadows, a background image behind text that also has a solid colour. Write them so that losing them leaves a correct email.

Four rows comparing a property supported and ignored. A rounded blue button becomes a square blue button. A gradient background behind white text becomes a solid navy background, still readable. A heading in Trebuchet MS falls back to Arial through its font stack. The same heading with no fallback control falls back to Times New Roman.
A browser render with the ignored property removed by hand on the right. A gradient stands in for a photo, and Trebuchet MS stands in for a web font. The last row shows the classic Outlook case Can I email describes in versions 2007 to 2016, where text falls back to Times New Roman.

The rules that make that true:

  • Set a background-color under every background-image, in a colour the text reads on.
  • Accept square corners in classic Outlook, or use the VML button if the shape is part of the brand.
  • End every font-family with web-safe fonts, hide web font declarations from Outlook with <!--[if !mso]><!-->, and add the [if mso] Arial rule.
  • Keep hover and transition effects in the head block, never as the only way to show a state.

5. Do not use @supports for detection

@supports would be the natural way to test for a property, but Can I email records no support in Gmail or any Outlook, so the clients you most need to detect are the ones that skip the block. Use the techniques above instead.

6. Draw it as an image

When a design needs something CSS cannot deliver everywhere (a brand font in a headline, a layered composition), an image is the dependable route, because every client in the table displays an <img>. Give it alt text and a background colour behind it for readers with images off. A countdown is the extreme case: no CSS in any client can change a number after the email arrives, so an email countdown timer from EmailTimer.app does the counting on the server and sends a picture, which no row of this table can break. Plans, including a free one, are on pricing.

How to read Can I email’s data

Can I email is the reference this table is built from, and it is worth reading directly for any property not listed here. Three things to know:

  • Each result is a version on a date. A feature page lists results per client version and platform, and some tests are old: the CSS variables page gives 2020 as its test date and the position page 2021, even where a single client was rechecked later. Gmail’s and Yahoo’s grid results changed from no to yes in a March 2026 retest. Check the test date before trusting a “no” that matters.
  • Partial always has a note. “Partial” might mean “not with non Google accounts”, “only on tables” or “not nested”. The note number in a cell tells you which, and the difference decides whether you can use the property.
  • Gmail has two audiences. Many Gmail notes apply only to the Gmail apps reading a non-Google mailbox, such as an Outlook.com address added to the Gmail app. Readers on Gmail accounts get much better support.

The data is a starting point, not a substitute for opening your own email. Email testing has the checklist for that.

CSS support checklist before you send

  1. Every style that affects layout, colour or readability is inline.
  2. The head <style> block holds only media queries, dark mode rules and enhancements, and is under 16 KB.
  3. No <link> stylesheets or @import, except a font <link> hidden from Outlook.
  4. Columns are table cells with widths; flexbox and grid only decorate.
  5. The container has an Outlook-only fixed-width table around the max-width div.
  6. Every background-image has a background-color under it, and a VML version if it carries content in classic Outlook.
  7. Rounded buttons have a VML version, or square corners are acceptable.
  8. Every font-family ends in web-safe fonts; web font declarations sit inside <!--[if !mso]><!-->, and the [if mso] Arial rule is in the head.
  9. Nothing depends on position, CSS variables, @supports or :hover.
  10. Variables and newer values have a plain declaration before them.
  11. The layout is correct with no media query applied.
  12. The email has been opened in classic Outlook, Gmail with a non-Google account in the app, and Apple Mail.

Questions and answers

Which CSS is safe to use in HTML email?

Inline styles for colour, fonts, font sizes, line height, padding on table cells, widths and borders are safe in every major client. A head <style> block for media queries is safe with limits. Treat flexbox, grid, border-radius, background-image and web fonts as needing a fallback, and avoid position, CSS variables and <link> stylesheets entirely.

Should I use inline CSS or a style block in email?

Both. Inline styles are the only ones every client reads, including the Gmail apps with non-Google accounts, so anything essential must be inline. A head <style> block is still needed for what cannot be inlined, such as media queries, dark mode rules and hover states. Write classes while you build and let an inliner copy the rules onto elements before you send.

Does Outlook support flexbox?

Outlook.com, Outlook for Mac and the Outlook apps for iOS and Android support display:flex in Can I email’s tests. Classic Outlook for Windows, versions 2007 to 2019, does not, because it draws email with Word’s engine. Build columns with tables if your readers use classic Outlook.

Can I use CSS grid in email?

In most clients, yes: Can I email records display:grid support in Apple Mail, Outlook.com, the Outlook apps, Samsung Email, Yahoo and, since a March 2026 retest, Gmail on the web. Classic Outlook for Windows does not support it, and the Gmail apps only support it for Google accounts, so grid still needs a table fallback for anything structural.

Does border-radius work in Outlook?

It works in Outlook.com, Outlook for Mac and the Outlook mobile apps. Classic Outlook for Windows ignores it and draws square corners. Can I email’s note points to the VML roundrect element for rounded shapes there, which is how bulletproof rounded buttons are built.

Can I use CSS variables in email?

Not reliably. Of the clients in this table, Can I email records support only in Apple Mail, iOS Mail and Samsung Email. Gmail keeps var() but removes the variable declarations, and no Outlook supports them. If you use them, put a plain value before every declaration that uses var().

Does position: absolute work in email?

Of the clients in this table, only in Apple Mail, iOS Mail and Samsung Email, according to Can I email’s tests. Gmail and classic Outlook support no position value, Outlook.com only sticky, and Yahoo only relative. To place text over an image, use a background image on a table cell with a VML fallback instead.

Does :hover work in email?

On desktop, mostly: Gmail on the web, Apple Mail, Yahoo and Samsung Email support it, and Outlook.com and Outlook for Mac support it only on type selectors such as a:hover. Classic Outlook and the Gmail iOS app do not. Phones have no pointer to hover with, so use it only for decoration.

How up to date is caniemail.com?

Its data file was last updated on 16 September 2026, but each feature has its own test date, and some are years old. Each feature page shows when every client version was tested. For a property your design depends on, check that date and confirm it with a test send.

What CSS does classic Outlook support?

Classic Outlook for Windows uses Word’s HTML engine, and Microsoft’s reference lists what it supports: colours, fonts, text alignment, line height and borders everywhere, with width, height and padding on elements such as tables, table cells and images but not on div, p or span. It treats background-image, float, position, max-width and min-width as unknown properties.

Can I use @supports in email to check for support?

Not usefully. Can I email records @supports working in Apple Mail, Yahoo and Samsung Email, but not in Gmail or any Outlook, and those are the clients you would want to detect. Write a plain fallback first and the enhanced value after it instead.

Does !important work in email?

Mostly, with quirks that break it silently. Can I email records that Gmail reads it only in lowercase, classic Outlook only with a space before it and not in inline styles, and Yahoo drops it without a space before it on background-image. Write it in lowercase with a space before it, and use it in the head block, where media queries need it to beat inline styles.

Can I use box-shadow or gradients in email?

As decoration only. Can I email records box-shadow in Apple Mail, Outlook.com, the Outlook apps and Samsung Email, but not in Gmail on the web, classic Outlook or Yahoo. linear-gradient() works in Gmail and Apple Mail but not in any Outlook or Yahoo, so always set a solid background-color underneath.

Sources

Related

Put a countdown in the campaign you are writing now

The free plan covers 5,000 opens a month with no card. Starter is $24 a month for 250,000.