HTML newsletter in Outlook

Classic Outlook on Windows renders mail with the Word engine, not a browser engine. That single fact explains the missing rounded corners, the ignored max-width and the gaps between your tables.

An HTML newsletter breaks in Outlook because classic Outlook for Windows lays out mail with the Microsoft Word rendering engine rather than a browser engine.

Word never had to support web layout, so a long list of ordinary CSS is simply skipped. The markup is not wrong. It is being read by something that was built for documents.

The same newsletter issue side by side: browser rendering on the left, mail client rendering on the right.
The same newsletter issue side by side: browser rendering on the left, mail client rendering on the right.

First, say which Outlook

"Outlook" covers at least four products with three rendering engines between them. A bug report without this detail cannot be acted on.

Product Rendering engine Typical failure
Classic Outlook, Windows desktop Microsoft Word Ignored max-width, gaps between tables, no rounded corners
New Outlook for Windows Browser engine Close to webmail behaviour
Outlook for Mac Browser engine Generally renders like a modern client
Outlook on the web Webmail Head styles may be rewritten

When a colleague says the issue is broken, ask which of these four they opened. Half the reported bugs are only present in the first row.

What an HTML newsletter in Outlook loses to the Word engine

The practical rule is that anything decorative may vanish, and anything structural must not depend on it.

  • max-width on a table or div. Word uses the width attribute instead.
  • border-radius. Corners arrive square.
  • background-image on an element, unless you add a VML fallback.
  • box-shadow, opacity and CSS transforms.
  • Flexbox, grid and position.
  • Some padding on non table elements.

Nothing here is required to deliver a readable issue. Treat each as a bonus for clients that support it.

Give Outlook a fixed width

Since max-width is ignored, the container needs a real width attribute that Word can read, while other clients still get the fluid behaviour.

<!--[if mso]>
<table width="600" cellpadding="0" cellspacing="0" border="0"><tr><td>
<![endif]-->
<div style="max-width:600px;margin:0 auto;">
  <!-- issue content -->
</div>
<!--[if mso]>
</td></tr></table>
<![endif]-->

The comment block is read only by Microsoft Office mail clients. Everything else treats it as an ordinary HTML comment and skips it.

The gaps between your tables

A frequent complaint is thin white lines appearing between stacked blocks that sit flush in a browser.

Three causes, usually together:

  1. cellpadding and cellspacing are not set to 0 on every table.
  2. The table lacks style="border-collapse:collapse;".
  3. An image inside a cell is still inline, leaving a descender gap below it.

Set all three. Images want style="display:block;" and an explicit width attribute.

Fonts and sizes

Word substitutes fonts more aggressively than browsers do. Declare a full stack on every text cell, ending in a generic family.

Line height is safer in pixels than as a unitless multiplier. Some Outlook builds also scale at high display settings, which is another reason to keep font sizes moderate rather than tiny.

A text cell in the markup with the full font stack and pixel line height visible.
A text cell in the markup with the full font stack and pixel line height visible.

Buttons that keep their shape

A styled link is the fragile version. The dependable version puts the colour on a table cell, so the button exists even when the link styling is dropped.

<table cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td align="center" bgcolor="#1a5fd0"
        style="padding:12px 24px;font-family:Arial,sans-serif;">
      <a href="https://example.com"
         style="color:#ffffff;text-decoration:none;font-size:16px;">
        Read the issue
      </a>
    </td>
  </tr>
</table>

Note bgcolor alongside the style. The attribute is honoured where the CSS is not.

Reporting an Outlook bug usefully

Half the time lost on these problems is spent working out what was actually seen.

Ask for four things: which Outlook, which operating system, whether images were allowed, and a screenshot at full size rather than a phone photo of a monitor.

Then reproduce it yourself before changing anything. A layout that only one person sees is often a display scaling setting or a client side rule, not the markup.

Test the actual client

There is no substitute. Send the issue to a real mailbox in each engine you care about, and check it with images blocked as well as allowed.

Before that, check the file stands alone. Open it in the HTML file opener, which has never seen your project folder. Anything that disappears there was reaching for a neighbouring file and will fail for readers too.

Publish the reference version

The awkward part of an Outlook bug report is agreeing on what the issue is supposed to look like. Screenshots pasted into a chat lose detail and cannot be compared at real size.

Paste the issue HTML into a NOS document and create a share link. The page renders the same for everyone who opens it, so the reference and the reported problem sit next to each other at full size.

The issue pasted into a document, rendering as a page of its own at its own address.
The issue pasted into a document, rendering as a page of its own at its own address.

The link also serves as the view in browser target in the issue header, which is the escape hatch for any reader whose client mangled the layout.

What not to chase

Some differences are not worth engineering around.

Difference Worth fixing Why
Layout collapses or overflows Yes The issue becomes unreadable
Cell gaps and white lines Yes Looks broken, cheap to fix
Square corners instead of rounded No Decoration only
Missing background image Usually not Set a background colour and move on
Slight font substitution No Readers do not notice

Spending a day matching pixel for pixel across engines is effort taken from the issue itself. Keep the structure sound, let the decoration degrade, and give every reader a link to the web version.

For the issue structure itself, see HTML email newsletter. For the base markup rules, see HTML email template and inline CSS.

Questions people ask

Why does my newsletter look different in Outlook than in Gmail?

Classic Outlook for Windows lays out mail using the Microsoft Word rendering engine rather than a browser engine. It has no support for several common CSS properties, so rounded corners, background images and max-width are ignored while the rest of the layout holds.

Which Outlook am I testing?

There are three engines under one name. Classic Outlook on Windows uses Word. Outlook for Mac and the new Outlook for Windows use a browser engine. Outlook on the web is webmail. A layout that fails in one may be fine in the others, so say which you tested.

What are MSO conditional comments?

Blocks written as an HTML comment that only Microsoft Office mail clients read. Everything else treats them as a comment and skips them. They are used to give Outlook a fixed width table or a fallback where a modern property would be ignored.

How can I show colleagues what the issue should look like?

Paste the HTML into a NOS document and share the link. The page renders the same for everyone regardless of their mail client, so the reference version and the sent version are easy to compare side by side.

Keep reading