Classic desktop Outlook for Windows renders HTML email with the layout engine from Microsoft Word, not with a web browser engine. That is why a template that looks perfect in Apple Mail or Gmail can have broken spacing, missing background images, wrong button shapes or oversized images in Outlook. The fix is not to avoid Outlook but to write email HTML that degrades well and to add Outlook-only code, using conditional comments and VML, where the Word engine needs help.
This guide explains what the engine does and does not support, how to target it, working snippets for buttons, backgrounds and image scaling, and a checklist for debugging. Outlook versions and their rendering change over time, and Microsoft also ships a newer Outlook that uses web technologies, so verify which versions your audience uses before spending effort on workarounds.
Which Outlook uses which engine
| Client | Rendering | Notes |
|---|---|---|
| Outlook for Windows (classic desktop) | Word engine | The one that needs workarounds |
| New Outlook for Windows | Web-based rendering | Closer to a browser; still test |
| Outlook for Mac | WebKit-based | Generally good CSS support |
| Outlook on the web | Browser-based | Strips or rewrites some CSS |
| Outlook mobile apps | Own rendering | Behaviour differs by platform |
| Outlook.com | Browser-based | Similar to webmail clients |
Because Microsoft continues to evolve Outlook, treat this table as a guide and check the vendor's documentation and your own analytics for the clients you really serve. If your audience is mostly consumers on mobile, effort on classic Outlook should be proportionate; B2B lists often include many classic desktop users.
What the Word engine does not handle well
- Modern layout: flexbox, grid and floats are unreliable or unsupported. Use tables.
- Sizing:
max-widthandmin-widthon many elements are ignored. Use explicitwidthattributes. - Spacing: margins and padding on some elements (especially
div,pand links) do not behave as in browsers. Put padding on table cells. - Backgrounds: CSS background images are not supported on most elements. Use VML.
- Buttons: padding on an anchor does not create a clickable block, and border-radius is ignored.
- Media queries: ignored, so the Outlook layout is the desktop layout.
- Images: may scale on high-DPI displays, and animated GIFs show only the first frame.
- Line height: uses its own rules and can add extra space unless you set
mso-line-height-rule.
Full property-level tables are maintained in email CSS support. Build a baseline design that uses only widely supported properties, then layer Outlook fixes on top.
Targeting Outlook with conditional comments
Outlook for Windows understands conditional comments that other clients treat as ordinary comments. The mso condition shows code only to Outlook, and !mso hides code from it. You can target versions, for example mso 16, but start with the general mso test.
<!--[if mso]>
<table role="presentation" width="600" cellpadding="0" cellspacing="0"><tr><td>
<![endif]-->
<div style="max-width:600px;margin:0 auto;">
Content seen by all clients
</div>
<!--[if mso]>
</td></tr></table>
<![endif]-->
<!--[if !mso]><!-->
<p>This paragraph is hidden from classic Outlook.</p>
<!--<![endif]-->This pattern, often called a ghost table, wraps a fluid container in a fixed-width table for Outlook only, so modern clients get the max-width version and Outlook gets the fixed one.
Document settings and image scaling
On displays set to a scaling level other than 100 percent, classic Outlook can enlarge images and break layouts. A well-known fix is to declare the pixel density in the head so Outlook renders at 96 DPI. Include the Office namespaces in the root element.
<html lang="en" xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta charset="utf-8">
<!--[if mso]>
<noscript>
<xml>
<o:OfficeDocumentSettings>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
</noscript>
<![endif]-->
</head>Also set explicit width and height attributes on images, and add style="display:block;border:0;" to avoid stray gaps. For related image guidance see blocked images and email image size and dimensions.
Bulletproof buttons with VML
The reliable button for Outlook is a VML rounded rectangle that contains the link text, hidden from other clients, followed by a CSS-styled anchor shown to everyone else. Other clients ignore the VML thanks to the comments.
<!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:w="urn:schemas-microsoft-com:office:word"
href="https://example.com/offer" style="height:44px;v-text-anchor:middle;width:200px;"
arcsize="10%" stroke="f" fillcolor="#0b5fff">
<w:anchorlock/>
<center style="color:#ffffff;font-family:Arial,sans-serif;font-size:16px;font-weight:bold;">
View the offer
</center>
</v:roundrect>
<![endif]-->
<!--[if !mso]><!-->
<a href="https://example.com/offer"
style="background:#0b5fff;border-radius:4px;color:#ffffff;display:inline-block;
font:bold 16px/44px Arial,sans-serif;text-align:center;
text-decoration:none;width:200px;">View the offer</a>
<!--<![endif]-->More button patterns, including simple padding-based buttons, are in HTML email links and buttons.
Background images with VML
For a hero section with text on top of a background image, use CSS background plus a VML rectangle with a fill for Outlook. Always set a solid background colour as a fallback for clients that block images.
<td background="https://example.com/hero.jpg" bgcolor="#1a1a2e"
width="600" height="300" valign="top" style="background-image:url('https://example.com/hero.jpg');background-size:cover;">
<!--[if gte mso 9]>
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false"
style="width:600px;height:300px;">
<v:fill type="frame" src="https://example.com/hero.jpg" color="#1a1a2e"/>
<v:textbox inset="0,0,0,0">
<![endif]-->
<div style="padding:40px;color:#ffffff;font:20px/28px Arial,sans-serif;">
Headline over the image
</div>
<!--[if gte mso 9]>
</v:textbox>
</v:rect>
<![endif]-->
</td>Fonts, spacing and dark mode
- Use web-safe stacks; custom web fonts fall back in classic Outlook. For selection see best email fonts.
- Add
mso-line-height-rule:exactlywith an explicitline-heightwhen spacing looks too large. - Reset table spacing with
mso-table-lspace:0pt;mso-table-rspace:0pt;if you see unexplained gaps. - Outlook dark mode can invert or alter colours. Test and read email dark mode.
- Keep the design simple enough that it still communicates if all enhancements fail.
A sensible strategy for supporting Outlook
Decide how much effort classic Outlook deserves by looking at your own data. Most email platforms and analytics tools can report the share of opens by client, with the caveat that image-proxy features can distort the figures. If classic Outlook is a small part of the audience, accept a simpler look there: a single column, a plain coloured block instead of a background photo and a text link instead of a rounded button. If it is a large part, as in many business-to-business programs, invest in VML buttons, ghost tables and thorough testing.
Whatever the choice, apply the principle of progressive enhancement. The base layer is a table-based, fixed-width, inline-styled email with readable text and working links. The next layer adds modern touches for clients that support them. The Outlook layer adds only what is needed to prevent breakage. This ordering keeps the code maintainable, because each Outlook patch is small and isolated inside a conditional comment, and anyone reading the template can see which part is a workaround.
Document the workarounds in the template itself with ordinary comments, and keep a library of tested snippets for buttons, backgrounds and columns. Reusing proven blocks is far safer than rewriting them for each campaign. When Microsoft changes Outlook, you can update the snippet in one place and retest, instead of hunting through dozens of templates. A short regression test, sending a standard test email through every supported client before major template changes, will catch most problems early. Finally, keep the HTML size moderate: heavy conditional code adds bytes, and large messages can be clipped by some clients.
Debugging checklist
- Validate that tables, rows and cells are properly closed; the Word engine is unforgiving.
- Remove CSS shorthand and unsupported properties from the Outlook path.
- Check conditional comments are paired and correctly closed.
- Confirm images have explicit width and height attributes.
- Test at 100 percent and at a scaled display setting.
- Compare with a previous working version to isolate the change. Keep versions as in template versioning.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Extra gaps between rows | Line height or table spacing | mso-line-height-rule, explicit cellpadding, mso-table spacing |
| Images too large | High DPI scaling | PixelsPerInch 96 setting and explicit sizes |
| Button is just text | Padding on link ignored | Use a VML button or padded table cell |
| Background image missing | CSS background unsupported | Add a VML fill and a solid colour fallback |
| Columns not aligned | Floats or divs used for layout | Use tables with fixed widths for Outlook |
| Fonts differ | Custom font fallback | Specify an acceptable web-safe fallback stack |
Send tested templates Deliver your HTML email through an SMTP relay and verify results before a large send.
References and further reading
Frequently asked questions
Why does my email look broken in Outlook?
Classic Outlook for Windows renders HTML with the Word engine, which ignores or mishandles many modern CSS properties.
How do I target only Outlook in HTML email?
Use mso conditional comments, which show code only to Outlook for Windows, and the !mso form to hide code from it.
What is VML in email?
Vector Markup Language, an Office-supported format used to draw buttons and background images in classic Outlook.
Why are images oversized in Outlook?
Display scaling can enlarge them. Set explicit dimensions and declare PixelsPerInch 96 in the document settings.
Do media queries work in classic Outlook?
No. Outlook for Windows shows the desktop layout, so build a fixed-width fallback.