Reference6 min read•Audience: Developers
Exported HTML Technical Specification
Detailed breakdown of the elements, meta tags, conditional comments, and CSS resets present in compiled PostBrix HTML.
Key Takeaways
- DOCTYPE: standard XHTML 1.0 Transitional / HTML5 hybrid.
- MSO conditionals enable VML support for Office 2007 through 2021.
- Viewport meta tag ensures initial-scale=1 on high-resolution smartphone screens.
- CSS resets prevent default margin injection by Outlook, Yahoo, and Gmail.
Component Breakdown of Exported HTML#
Every HTML file exported from PostBrix includes:
- Strict HTML Boilerplate:
<!doctype html>ensures webmail clients render in standard mode rather than quirks mode.xmlns:v="urn:schemas-microsoft-com:vml"andxmlns:o="urn:schemas-microsoft-com:office:office"enable vector buttons and backgrounds in Microsoft Word-based Outlook clients.
- Text Size Adjustments:
-webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%;prevents iOS Safari and Windows Phone from unexpectedly enlarging text sizes on portrait/landscape rotation.
- Table Spacing Resets:
mso-table-lspace: 0pt; mso-table-rspace: 0pt;eliminates unwanted margins around table cells in Outlook.
- Responsive Media Queries:
- Injected in the
<head><style>block to manage fluid columns and mobile scaling.
Outlook Vector Markup Language (VML) Namespaces#
To enable background images and pill buttons in Microsoft Word-based Outlook clients:
- The
<html>tag declaresxmlns:v="urn:schemas-microsoft-com:vml"andxmlns:o="urn:schemas-microsoft-com:office:office". - The
<head>declares<xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml>. - This ensures 96 DPI coordinate consistency across Microsoft Office versions.
Frequently Asked Questions
Why does PostBrix use a hybrid XHTML/HTML5 DOCTYPE?
Older desktop email clients (Outlook 2010–2016) parse emails using legacy XHTML parsers, while modern webmail (Gmail, Outlook.com) runs in HTML5 browsers. The hybrid DOCTYPE satisfies both parsers simultaneously.
Does the exported HTML validate against the W3C validator?
Because email HTML contains vendor-specific conditional comments (<!--[if mso]>) and VML namespace tags, standard W3C validators will flag notices. This is intentional and necessary for email client compatibility.