| Internet-Draft | URES | January 2026 |
| Hackett | Expires 16 July 2026 | [Page] |
This document specifies requirements for the uniform rendering of HTML email content across mail user agents (MUAs). It addresses critical inconsistencies in how email clients interpret HTML and CSS, including dark mode adaptation, embedded asset handling, positioning constraints, and secure SVG rendering. The specification aims to eliminate the current fragmentation in email rendering while maintaining backwards compatibility with existing MIME standards (RFCs 2045-2049) and the Internet Message Format (RFC 5322).¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 5 July 2026.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
Email remains one of the most critical communication channels for both personal and business communications. Despite decades of development, the rendering of HTML email content remains frustratingly inconsistent across mail user agents (MUAs).¶
The current standards landscape is fragmented:¶
This gap has resulted in a situation where email developers must maintain extensive compatibility matrices, use archaic techniques such as table-based layouts, and accept that their carefully crafted emails will appear differently—or broken—across different clients.¶
The following critical issues plague current email rendering:¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
Conforming MUAs MUST support HTML5 document structure as defined in [HTML5]. The following DOCTYPE declaration MUST be recognised:¶
<!DOCTYPE html>¶
MUAs MUST also accept and render documents using XHTML and HTML4 doctypes for backwards compatibility. However, email authors SHOULD use HTML5.¶
MUAs MUST NOT require an XML declaration for HTML email content.¶
MUAs MUST correctly parse and render the following minimal document structure:¶
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="color-scheme" content="light dark">
<meta name="supported-color-schemes" content="light dark">
<title>Email Subject</title>
<!--[if mso]>
<noscript>
<xml>
<o:OfficeDocumentSettings>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
</noscript>
<![endif]-->
<style>
/* Author styles */
</style>
</head>
<body>
<!-- Content -->
</body>
</html>¶
MUAs MUST preserve the html element's lang attribute and make it available to accessibility tools.¶
MUAs MUST parse and apply the viewport meta tag for responsive rendering on mobile devices.¶
MUAs supporting Microsoft Office conditional comments SHOULD interpret <!--[if mso]> blocks appropriately.¶
MUAs MUST support CSS styles in ALL of the following locations:¶
MUAs MUST NOT strip or ignore style elements based on their placement in the document.¶
MUAs MUST process multiple style elements in document order, applying standard CSS cascade rules.¶
MUAs SHOULD support link rel="stylesheet" elements referencing external stylesheets, subject to security controls defined in Section 8.¶
When an MUA chooses not to load external stylesheets for security reasons, it MUST still apply all inline and embedded styles.¶
Conforming MUAs MUST support the following CSS properties with full specification compliance:¶
margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, border, border-width, border-style, border-color, border-top, border-right, border-bottom, border-left, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-left-radius, border-bottom-right-radius, width, min-width, max-width, height, min-height, max-height, box-sizing¶
font-family, font-size, font-weight, font-style, line-height, text-align, text-decoration, text-decoration-line, text-decoration-color, text-decoration-style, text-transform, letter-spacing, word-spacing, white-space, vertical-align¶
color, background-color, background-image (for gradients and data: URIs), background-position, background-repeat, background-size, background (shorthand), opacity¶
display (block, inline, inline-block, none, table, table-row, table-cell, flex, inline-flex), position (static, relative), float, clear, overflow, overflow-x, overflow-y¶
MUAs MUST support the following CSS selectors:¶
Type selectors (p, div, table), Class selectors (.classname), ID selectors (#idname), Descendant combinator (div p), Child combinator (div > p), Adjacent sibling combinator (h1 + p), Attribute selectors ([attr], [attr=value], [attr~=value], [attr|=value], [attr^=value], [attr$=value], [attr*=value]), Pseudo-classes (:first-child, :last-child, :nth-child(), :hover, :active, :focus, :visited, :link), Pseudo-elements (::before, ::after, ::first-line, ::first-letter)¶
For security reasons detailed in Section 8.2, MUAs MUST constrain the position property as follows:¶
MUAs MUST support:¶
Web-based MUAs (those running within a web browser context) MUST treat the following values as position: static:¶
When an email contains these prohibited position values, the MUA MUST either:¶
The z-index property controls stacking order within a stacking context. MUAs MUST implement z-index handling that prevents malicious overlay attacks.¶
MUAs MUST create a new stacking context for email content that is isolated from the host application. This means:¶
MUAs SHOULD normalise z-index values within email content. If an email specifies z-index: 2147483647 (the maximum 32-bit signed integer), this MUST still be rendered below application UI.¶
Implementation approaches:¶
MUAs MUST support CSS Flexible Box Layout [CSS-FLEXBOX-1] including:¶
display: flex, display: inline-flex, flex-direction, flex-wrap, flex-flow, justify-content, align-items, align-content, order, flex-grow, flex-shrink, flex-basis, flex, align-self¶
MUAs SHOULD support CSS Grid Layout [CSS-GRID-1]. Where supported, MUAs MUST implement:¶
display: grid, display: inline-grid, grid-template-columns, grid-template-rows, grid-template-areas, grid-gap, gap, row-gap, column-gap, grid-column, grid-row, grid-area¶
Dark mode support is critical for email legibility. This section defines requirements for consistent dark mode behaviour.¶
MUAs MUST recognise and honour the color-scheme meta tag:¶
<meta name="color-scheme" content="light dark">¶
Valid values:¶
When color-scheme is set to "only light", MUAs MUST NOT invert, adjust, or otherwise modify the colours specified by the email author, even when the MUA or operating system is in dark mode.¶
MUAs MUST support the prefers-color-scheme media query:¶
@media (prefers-color-scheme: dark) {
body {
background-color: #1a1a1a;
color: #ffffff;
}
}
@media (prefers-color-scheme: light) {
body {
background-color: #ffffff;
color: #1a1a1a;
}
}¶
When the user has selected dark mode in their MUA or operating system, prefers-color-scheme: dark MUST match.¶
MUAs MUST NOT strip or ignore @media rules, including @media (prefers-color-scheme: ...) rules.¶
When an MUA applies automatic dark mode adaptation to an email that has not opted out, the following rules MUST be followed:¶
MUAs MUST NOT invert foreground colours without also inverting the corresponding background colour. Specifically:¶
When inverting colours, MUAs MUST maintain a minimum contrast ratio of 4.5:1 for normal text and 3:1 for large text, as defined in WCAG 2.1 [WCAG21].¶
Inline images using data: URIs provide a tracking-free method for including images directly in email content. MUAs MUST support this mechanism.¶
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO 9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot">¶
MUAs MUST render inline base64 images for the following MIME types:¶
MUAs MUST support inline images with encoded sizes of at least:¶
MUAs MAY support larger sizes but MUST NOT fail to render images below these thresholds.¶
Content-ID references allow images attached to the email to be displayed inline. MUAs MUST support this mechanism as defined in RFC 2392 [RFC2392].¶
Scalable Vector Graphics provide resolution-independent images essential for logos, icons, charts and diagrams. This section defines an "Executive-Safe" SVG profile that balances functionality with security.¶
The Executive-Safe SVG Profile defines a restricted subset of SVG that MUST be supported by conforming MUAs. This profile is named to emphasise that SVG content—particularly logos and charts—must render correctly in email clients commonly used by business executives.¶
The Executive-Safe profile includes:¶
The Executive-Safe profile excludes:¶
MUAs MUST strip or neutralise the following SVG elements:¶
The script element and any element with on* attributes (onclick, onload, onerror, etc.) MUST be stripped.¶
Email is a primary vector for phishing, malware distribution and social engineering attacks. MUAs MUST implement robust security measures while rendering HTML content.¶
MUAs MUST NOT execute JavaScript or any other scripting language in email content.¶
The following elements MUST be stripped or rendered inert:¶
The following attributes MUST be stripped from all elements:¶
All on* event handlers: onclick, onload, onerror, onmouseover, onfocus, onblur, onsubmit, etc.¶
In web-based MUAs, malicious use of CSS positioning could overlay deceptive content atop the webmail UI.¶
MUAs MUST NOT render position: fixed as specified. Such elements:¶
MUAs MUST ensure that email content z-index values cannot cause elements to render above the MUA interface.¶
Implementation: Create a new stacking context for email content that is positioned below all MUA UI elements.¶
Remote images are commonly used as tracking pixels. MUAs SHOULD:¶
The mandatory support for base64 inline images (Section 6.1) and CID images (Section 6.2) provides senders with tracking-free alternatives for embedding images.¶
Email content MUST be accessible to users with disabilities. MUAs MUST NOT strip or alter HTML that supports accessibility.¶
MUAs MUST correctly interpret and render semantic HTML elements:¶
header, footer, nav, main, article, section, aside, h1 through h6, p, ul, ol, li, dl, dt, dd, table, th, td (with scope attributes), figure, figcaption, blockquote, cite, strong, em¶
MUAs MUST NOT flatten semantic structure (e.g., converting all elements to div or span).¶
MUAs MUST:¶
MUAs MUST NOT strip:¶
alt, title, role, aria-label, aria-labelledby, aria-describedby, aria-hidden, aria-live, aria-atomic, aria-relevant¶
When MUAs apply automatic dark mode adaptation (Section 5.3), the resulting colour combinations MUST maintain WCAG 2.1 AA contrast ratios:¶
To facilitate gradual adoption, this specification defines three conformance levels.¶
An MUA conforming to URES Level 1 MUST:¶
An MUA conforming to URES Level 2 MUST:¶
An MUA conforming to URES Level 3 MUST:¶
This section addresses practical considerations for adoption of this specification by email client vendors.¶
The authors recognise that some email client vendors have historically been reluctant to invest in standards-compliant rendering engines, preferring instead to repurpose existing technologies (such as word processing engines) that were never designed for standards-compliant HTML/CSS rendering.¶
To address this, the community intends to develop and maintain open source reference implementations of URES-compliant rendering components. These implementations will be:¶
Vendors who have historically chosen not to invest in standards- compliant rendering may simply adopt these community-maintained implementations when ready, rather than continuing to maintain proprietary solutions that diverge from industry consensus.¶
This approach mirrors successful adoption patterns across the software industry, where vendors have benefited from community- developed standards and implementations rather than maintaining proprietary alternatives:¶
Vendors currently maintaining non-compliant rendering engines face an ongoing maintenance burden for technology that provides no competitive advantage. The availability of URES-compliant open source alternatives offers a path to reduced maintenance costs while improving interoperability for their users.¶
Vendors need not adopt all conformance levels simultaneously. The three-tier conformance structure (Section 10) enables:¶
This graduated approach ensures that even conservative vendors can adopt URES without significant risk, leveraging battle-tested implementations developed and maintained by the broader community.¶
This document registers a new media feature for the prefers-color-scheme-only media query:¶
This document requests registration of the following HTTP header for use in email content negotiation:¶
This appendix documents specific inconsistencies in current email clients that this RFC aims to address. Data sourced from caniemail project [CANIEMAIL] and direct testing as of January 2026.¶
| Property | Gmail | O.com | O.app | Apple | Yahoo | T-bird |
|---|---|---|---|---|---|---|
| style in head | Partial | Yes | Yes | Yes | Yes | Yes |
| display: flex | Yes | Yes | No | Yes | Yes | Yes |
| display: grid | Yes | Yes | No | Yes | Yes | Yes |
| position: fixed | No | No | No | No | No | Yes |
| position: absolute | No | No | Yes | Yes | No | Yes |
| background-image | Yes | Yes | No | Yes | Yes | Yes |
| border-radius | Yes | Yes | Partial | Yes | Yes | Yes |
| @media queries | No | Yes | Yes | Yes | Yes | Yes |
| CSS variables | Yes | Yes | No | Yes | Yes | Yes |
| @font-face | No | Yes | No | Yes | No | Yes |
| ::before/::after | No | Yes | No | Yes | Yes | Yes |
Legend: Gmail (web), O.com (Outlook.com), O.app (Outlook desktop), Apple (Apple Mail), Yahoo (Yahoo Mail), T-bird (Thunderbird)¶
The author wishes to acknowledge the work of the Email Standards Project (2007-2011), the W3C HTML for Email Community Group (2014-2023), and the caniemail.com project for documenting the inconsistencies that this specification aims to address.¶