Skip to main content

Gmail

Engine: Gmail Web·webmail·Dark mode: Yes

Gmail's web client uses its own rendering engine that aggressively sanitizes HTML. It strips all <style> blocks, rewrites class names with a random prefix, and removes any CSS it deems unsafe. The result: your email must rely on inline styles for every critical declaration.

Gmail is the most popular email client globally with over 1.8 billion users. Its web client is the primary interface for consumer and small-business email.

CSS coverage profile for Gmail

Gmail renders with the Gmail Web engine and supports 122 of 251 tracked CSS and HTML features fully, with 15 partially supported and 114 unsupported. That places it in a moderate coverage band.

A meaningful portion of CSS is unsupported or partially supported. Plan fallbacks for layout-critical features and validate every template before send.

122

Supported

15

Partial

114

Unsupported

251

Total

Key gotchas in Gmail

<style> blocksSee details

Gmail strips all <style> and <link> tags. Only inline CSS survives. This is the single most common cause of broken emails in Gmail.

CSS class names

Gmail rewrites class attributes with a random prefix (e.g., class="m_123abc"). Class-based styling from your <style> block won't match after rewriting.

display: flex / gridSee details

Both are stripped by Gmail's sanitizer. Use table-based layout for all structural elements.

position: absolute / fixed

Gmail removes all position declarations except static and relative. No overlay or absolute positioning is possible.

How Gmail renders email

  • Gmail's sanitizer is the strictest of any major webmail provider. Whatever survives sanitization is treated as inline-only — every critical declaration must live inside a style attribute on the element it targets.
  • Class rewriting prefixes every class with a per-message identifier (e.g., m_-1234567890abcdef_button). Selectors that depend on stable class names break after rewriting; rely on inline styles or attribute-based hooks where possible.
  • Gmail honours @media queries inside surviving <style> blocks, but only when those <style> blocks are not stripped — Gmail keeps a small subset, primarily for media-query-driven dark-mode overrides.
  • Embedded fonts via @font-face must come from approved hosts (Google Fonts) or be referenced through external link tags that Gmail recognises; otherwise the fallback is system fonts.

Dark mode behaviour in Gmail

Gmail web supports dark mode and auto-inverts colors using its own algorithm. It targets background-color and color properties, often producing unexpected contrast issues. Use the color-scheme meta tag and test explicitly with dark mode simulation.

QA checklist for Gmail

  • Always preview with images enabled and disabled — Gmail's image-blocking on first open from unknown senders changes layout dramatically.
  • Validate that the inline color and background-color pair survives Gmail's dark-mode auto-inversion.
  • Spot-check that critical class-based hooks have inline equivalents, since class rewriting will break any stylesheet-only selectors.

Related clients

HTML Elements40

FeatureSupport
<abbr>Supported
<acronym>Supported
<address>Supported
<audio>Unsupported
<base>Partial
<bdi>Unsupported
<blockquote>Supported
<body>Partial
<code>Supported
<del>Supported
<dfn>Supported
<dialog>Unsupported
<div>Supported
<form>Supported
<h1>Supported
<hr>Supported
<img>Supported
<link>Unsupported
<marquee>Unsupported
<meter>Unsupported
<object>Unsupported
<p>Supported
<picture>Unsupported
<pre>Supported
<progress>Unsupported
<rp>Unsupported
<rt>Unsupported
<ruby>Unsupported
<select>Supported
<small>Supported
<span>Supported
<strike>Supported
<strong>Supported
<style>Partial
<svg>Unsupported
<table>Supported
<textarea>Supported
<ul>Partial
<video>Unsupported
<wbr>Supported

CSS At-Rules5

FeatureSupport
@font-faceUnsupported
@importUnsupported
@keyframesUnsupported
@mediaUnsupported
@supportsUnsupported

Pseudo-Elements6

FeatureSupport
::afterUnsupported
::beforeUnsupported
::first-letterUnsupported
::first-lineUnsupported
::markerUnsupported
::placeholderUnsupported

Pseudo-Classes & Selectors32

FeatureSupport
:adjacent-siblingSupported
:attribute-selectorPartial
:chainingSupported
:checkedUnsupported
:child-combinatorSupported
:class-selectorSupported
:descendant-combinatorSupported
:first-childUnsupported
:first-of-typeUnsupported
:focusUnsupported
:general-siblingSupported
:groupingSupported
:hasUnsupported
:hoverSupported
:id-selectorSupported
:langUnsupported
:last-childUnsupported
:last-of-typeUnsupported
:linkUnsupported
:notUnsupported
:nth-childUnsupported
:nth-last-childUnsupported
:nth-of-typeUnsupported
:only-childUnsupported
:only-of-typeUnsupported
:targetUnsupported
:type-selectorSupported
:universal-selectorSupported
:visitedUnsupported
pseudo-class-activeUnsupported
pseudo-class-defaultUnsupported
pseudo-class-nth-last-of-typeUnsupported

CSS Functions8

FeatureSupport
calcSupported
clampSupported
conic-gradientUnsupported
fit-contentSupported
linear-gradientSupported
maxSupported
minSupported
radial-gradientSupported

CSS Properties160

FeatureSupport
!importantPartial
accent-colorUnsupported
align-itemsUnsupported
animationUnsupported
aspect-ratioUnsupported
backdrop-filterUnsupported
backgroundSupported
background-blend-modeSupported
background-clipSupported
background-colorSupported
background-imageSupported
background-originSupported
background-positionSupported
background-repeatSupported
background-sizeSupported
bimiSupported
block-sizeUnsupported
borderSupported
border-collapseSupported
border-imageUnsupported
border-inlineUnsupported
border-inline-individualUnsupported
border-inline-longhandUnsupported
border-radiusSupported
border-radius-logicalUnsupported
border-spacingSupported
bottomUnsupported
box-shadowUnsupported
box-sizingSupported
caption-sideSupported
clearSupported
clip-pathUnsupported
colorSupported
color-schemeUnsupported
column-countSupported
columnsSupported
css-commentsSupported
cursorUnsupported
custom-propertiesUnsupported
directionSupported
displaySupported
display:flexSupported
display:gridUnsupported
display:noneSupported
empty-cellsSupported
filterUnsupported
flex-directionUnsupported
flex-wrapUnsupported
floatSupported
fontSupported
font-familySupported
font-kerningSupported
font-sizeSupported
font-stretchSupported
font-weightSupported
gapPartial
grid-template-columnsUnsupported
heightSupported
hyphenate-characterUnsupported
hyphenate-limit-charsUnsupported
hyphensUnsupported
inline-sizeUnsupported
insetUnsupported
justify-contentUnsupported
leftUnsupported
letter-spacingSupported
light-darkUnsupported
line-heightSupported
list-stylePartial
list-style-imageUnsupported
list-style-positionSupported
list-style-typeSupported
marginPartial
margin-block-start-endUnsupported
margin-inline-blockUnsupported
margin-inline-start-endUnsupported
mask-imageUnsupported
max-block-sizeUnsupported
max-heightSupported
max-inline-sizeUnsupported
max-widthSupported
min-block-sizeUnsupported
min-heightSupported
min-inline-sizeUnsupported
min-widthSupported
mix-blend-modeSupported
modern-colorUnsupported
nestingUnsupported
object-fitSupported
object-positionSupported
opacitySupported
orphansUnsupported
outlineSupported
outline-offsetUnsupported
overflowPartial
overflow-wrapUnsupported
paddingSupported
padding-block-start-endUnsupported
padding-inline-blockUnsupported
padding-inline-start-endUnsupported
positionUnsupported
resizeUnsupported
rgbPartial
rgbaPartial
rightUnsupported
scroll-snapUnsupported
shape-marginUnsupported
shape-outsideUnsupported
system-uiSupported
tab-sizeUnsupported
table-layoutSupported
text-alignSupported
text-align-lastSupported
text-decorationSupported
text-decoration-colorSupported
text-decoration-lineSupported
text-decoration-skip-inkUnsupported
text-decoration-styleSupported
text-decoration-thicknessUnsupported
text-emphasisSupported
text-emphasis-positionUnsupported
text-indentPartial
text-justifyPartial
text-orientationSupported
text-overflowSupported
text-shadowUnsupported
text-transformSupported
text-underline-offsetUnsupported
text-underline-positionSupported
text-wrapUnsupported
topUnsupported
transformUnsupported
transitionUnsupported
unit-chSupported
unit-cmSupported
unit-emSupported
unit-exSupported
unit-inSupported
unit-initialPartial
unit-mmSupported
unit-pcSupported
unit-percentSupported
unit-ptSupported
unit-pxSupported
unit-remSupported
unit-vhSupported
unit-vmaxSupported
unit-vminSupported
unit-vwSupported
user-selectUnsupported
vertical-alignSupported
visibilityUnsupported
white-spaceSupported
white-space-collapseUnsupported
widowsUnsupported
widthSupported
word-breakSupported
word-spacingSupported
writing-modeSupported
z-indexUnsupported

Test your email across all 15 clients

Preview rendering, catch CSS issues, and get actionable fixes — free.

Try Emailens Free

Support data last updated Apr 27, 2026 · synced from caniemail.com via @emailens/engine.