Skip to main content
Emailens
CSS Properties

margin

CSS property · 9 supported, 12 partial, 0 unsupported across 21 clients

margin splits the field: 9 full, 12 partial of 21 clients as of Sep 2, 2026, the partials (Gmail, Gmail Android, Gmail iOS) are where sends go wrong.

  • 3/7 webmail, 4/6 desktop, 2/8 mobile clients support margin fully.
  • Partial in Gmail, Gmail Android, Gmail iOS, Outlook 365 and 8 more, behavior differs from browsers, test before relying on it.
  • Outlook Classic (Word engine, supported to at least 2029) does not fully support margin, and its replacement changes little here; see the deprecation diff.
  • Across all clients, only 6 of 298 tracked HTML/CSS features render identically everywhere.

Source: caniemail.com (MIT), via the Emailens engine. Last tested upstream Oct 1, 2019, synced by Emailens Sep 2, 2026.

margin controls external spacing around block-level elements and is notably less reliable in email than padding. Outlook on Windows ignores margin on most elements, so production email layouts typically substitute margin with padded <td> cells. Modern clients honor margin correctly, but the lowest-common-denominator approach is to avoid it entirely for structural spacing.

Client Support

ClientCategoryEngineSupport
GmailwebmailGmail WebPartialSee caveat 1
Gmail AndroidmobileGmail MobilePartialSee caveat 1
Gmail iOSmobileGmail MobilePartialSee caveat 1
Outlook 365webmailOutlook WebPartialSee caveat 1
Outlook (New)desktopOutlook WebPartialSee caveat 2
Outlook ClassicdesktopMicrosoft WordPartialSee caveat 3
Outlook iOSmobileOutlook MobilePartialSee caveat 1
Outlook AndroidmobileOutlook MobilePartialSee caveat 1
Outlook for MacdesktopWebKitSupported
Apple MaildesktopWebKitSupported
Apple Mail iOSmobileWebKitSupported
Yahoo MailwebmailYahooPartialSee caveat 1
Yahoo Mail AndroidmobileYahooPartialSee caveat 1
Yahoo Mail iOSmobileYahooPartialSee caveat 1
Samsung MailmobileSamsungSupported
ThunderbirddesktopGeckoSupported
HEY MailwebmailWebKitSupported
Proton MailwebmailProtonSupported
AOL MailwebmailAOLPartialSee caveat 1
FastmailwebmailFastmailSupported
SuperhumandesktopBlinkSupported

Documented caveats (3)

  1. 1.Gmail, Gmail Android, Gmail iOS, Outlook 365, Outlook iOS, Outlook Android, Yahoo Mail, Yahoo Mail Android, Yahoo Mail iOS, AOL Mail: Partial. Negative values are not supported.
  2. 2.Outlook (New): Partial. Negative values are not supported. Partial. Not supported on <span> and <body> elements. Buggy. background-color is included inside the margin. Partial. auto value is not supported.
  3. 3.Outlook Classic: Partial. Negative values are not supported. Partial. Not supported on <span> and <body> elements. Buggy. background-color is included inside the margin.

Caveats recorded by caniemail.com (MIT) and carried verbatim, one entry per wording rather than per client.

Client-by-client behaviour for margin

Fully supports margin (9): Outlook for Mac, Apple Mail, Apple Mail iOS, Samsung Mail, Thunderbird, HEY Mail, Proton Mail, Fastmail, Superhuman.

Partial support (12): Gmail, Gmail Android, Gmail iOS, Outlook 365, Outlook (New), Outlook Classic, Outlook iOS, Outlook Android, Yahoo Mail, Yahoo Mail Android, Yahoo Mail iOS, AOL Mail. Expect rendering quirks unique to each engine. Partial support typically means a subset of values, an ignored shorthand, or sanitizer-specific rewrites.

When to use margin in email

  • Centering an outer table by setting margin: 0 auto on the table element when targeting modern clients only.
  • Adding small gaps between inline-block elements in mobile-first templates.
  • Resetting default margins on block elements like <p>, <h1>, and <ul> via inline overrides.

Rendering behaviour and edge cases

  • Outlook on Windows ignores margin on table elements, breaking centering tricks unless you use align="center" and a fixed width.
  • Gmail strips negative margin values entirely, making margin-based off-canvas tricks unreliable.
  • Some clients add extra default margin on <p> tags , explicitly set margin: 0 on every paragraph that needs predictable spacing.

Recommended fallback strategy

Replace structural margin with padded table cells for cross-client consistency. Use margin only for resetting browser defaults on block elements, and always set explicit margin: 0 on <p>, <h1>–<h6>, and <ul> to prevent client-default spacing from pushing your layout.

Fixes & Workarounds

Gmail

Partial

"margin" is not supported in this email client.

Gmail Android

Partial

"margin" is not supported in this email client.

Gmail iOS

Partial

"margin" is not supported in this email client.

Outlook 365

Partial

"margin" is not supported in this email client.

Outlook (New)

Partial

"margin" is not supported in this email client.

Outlook Classic

Partial

"margin" is not supported in this email client.

Outlook iOS

Partial

"margin" is not supported in this email client.

Outlook Android

Partial

"margin" is not supported in this email client.

Yahoo Mail

Partial

"margin" is not supported in this email client.

Yahoo Mail Android

Partial

"margin" is not supported in this email client.

Yahoo Mail iOS

Partial

"margin" is not supported in this email client.

AOL Mail

Partial

"margin" is not supported in this email client.

Related Features

Check your own HTML for margin

Paste your own, or run the sample below. Analyzed in this page, with no signup and nothing stored.

Zero-Friction Engine Preview

Test your margin layout across 21 email clients

Preview rendering, catch CSS issues, and see how margin displays across Outlook, Gmail, and Apple Mail. Free, no account needed.

Instant live preview · No signup required · 21 email engines

Last tested upstream: · Last synced by Emailens:

caniemail.com (MIT) records Oct 1, 2019 as the last time margin was tested in a real client, 6 years before this sync. Syncing copies that result forward, it does not re-test it. Carried in @emailens/engine data v0.12.2.