Deep Dive7 min read•Audience: Developers, Designers
HTML Export & Code Structure
A deep dive into the anatomy of PostBrix HTML export: doctype, Outlook conditional comments, VML namespaces, and responsive media queries.
Key Takeaways
- PostBrix HTML is generated by compiling MJML through strict validation and terser minification.
- Includes Outlook/MSO conditional comments (<!--[if mso]>) and VML namespaces (xmlns:v="urn:schemas-microsoft-com:vml").
- Features responsive media queries in the <head><style> tag for mobile column stacking and typography scaling.
- PostBrix does NOT claim 100% style inlining down to removing <style> tags — media queries are intentionally retained in <style> to power mobile responsiveness.
Anatomy of the Exported HTML Document#
When you inspect a PostBrix HTML export, you will find a highly structured document engineered specifically for email client engines:
code
html
Technical Clarification on CSS Inlining#
Some legacy email tools claim "100% inlined HTML with no <style> tags". In modern email development, that is an anti-pattern:
- Component Styles: PostBrix inlines essential CSS (font sizes, colors, background colors, padding) directly onto table cells and anchor tags.
- Media Queries: Mobile responsive rules (
@media only screen and (min-width:480px)) must live inside a<style>block in the document<head>. Stripping the<style>block would completely destroy mobile responsiveness. - All major mobile email apps (Apple Mail, Gmail App on iOS/Android, Samsung Mail) fully support
<style>blocks in the<head>.
Realistic CSS Delivery
PostBrix produces email-compatible HTML compiled from MJML. It combines inlined element attributes for desktop Outlook compatibility with head-level media queries for modern mobile responsiveness.
Frequently Asked Questions
Why does PostBrix HTML include MSO conditional comments?
Microsoft Outlook desktop (2016–2021) uses Microsoft Word as its rendering engine. MSO comments instruct Word how to format table widths, VML background graphics, and fonts without breaking web standards.
Can I remove the <style> tags in the header?
Do not remove the header <style> tags. They contain the responsive media queries that cause columns to stack vertically on phone viewports.