<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Outfit:wght@600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap">
πŸ“£ Marketing guide

HTML Email Best Practices: Tables, Inline CSS, Outlook, Dark Mode and Deliverability

How to build HTML emails that render everywhere: table layouts, inline CSS, Outlook quirks, 600px width, images off, dark mode, Gmail clipping and SPF/DKIM.

πŸ“… Published 2026-11-15⏱️ 5 min readπŸ› οΈ 3 free tools

Building an HTML email feels like going back twenty years in web development. Flexbox and grid are unreliable, external stylesheets are ignored, JavaScript never runs, and the most widely used desktop client in many offices, classic Outlook for Windows, renders HTML with the Microsoft Word engine. Code that looks perfect in a browser can fall apart in an inbox.

This guide covers the techniques that make emails hold up across Gmail, Apple Mail, Outlook and mobile apps: structure, styling, images, dark mode, size limits and accessibility, plus the authentication records that decide whether the email reaches the inbox at all.

Use tables for layout

Email clients support a narrow and inconsistent slice of CSS. Classic Outlook for Windows (2007 to 2021 and the Microsoft 365 desktop app in its classic mode) uses Word to render HTML, which ignores float, position, flexbox, grid, max-width on most elements, and background images set in CSS. Tables are the one layout mechanism every client understands.

The standard pattern is a full-width outer table for the background colour, a centred inner table about 600 pixels wide for the content, and nested tables for columns. Set role="presentation" on layout tables so screen readers do not announce them as data tables. Give widths in HTML attributes as well as CSS, because Outlook often respects only the attribute.

<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td align="center" style="background:#f4f4f4;">
      <table role="presentation" width="600" cellpadding="0" cellspacing="0" border="0"
             style="width:100%;max-width:600px;background:#ffffff;">
        <tr>
          <td style="padding:24px;font-family:Arial,sans-serif;font-size:16px;line-height:24px;color:#222222;">
            Hello, your order has shipped.
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>

Inline your CSS and keep it simple

Gmail and most webmail clients now support a <style> block in the head, but support is not universal (some Gmail app configurations and many corporate gateways strip it), and forwarded emails often lose it. Put every style that matters inline on the element, and use the <style> block only for progressive enhancements such as media queries for mobile and dark mode.

Stick to properties with broad support: font-family, font-size, line-height, color, background-color, padding on table cells, border and text-align. Margins are unreliable in Outlook, so space content with cell padding instead. Use web-safe font stacks; custom web fonts work in Apple Mail and some others but fall back elsewhere, and Outlook may fall back to Times New Roman unless you specify a fallback in a conditional comment.

  • Avoid shorthand where Outlook is fussy: write padding on <td>, not on <p> or <div>.
  • Set line-height in pixels, not unitless values, for consistent spacing.
  • Use six-digit hex colours (#ffffff); some clients mishandle three-digit shorthand or named colours.
  • Buttons are best built as a padded table cell with a link inside (a "bulletproof button"), so the whole area is clickable and it renders without images.

Width, mobile and images-off rendering

Around 600 pixels remains the safe content width: it fits the reading pane of desktop clients and scales down cleanly. On mobile, use a media query to make columns stack at 100% width, and design the single-column version first if most of your audience opens on phones.

Assume images may not load. Some Outlook configurations and corporate clients block images until the reader allows them, and privacy features in Apple Mail and Gmail proxy or prefetch images, which also makes open-rate tracking unreliable. Put the key message and the call to action in live text, give every meaningful image descriptive alt text, set explicit width and height so the layout does not collapse, and use an empty alt="" for decorative images. Never build the whole email as one image: it will be blank for some readers, inaccessible to screen readers, and is a common spam signal.

Dark mode, size limits and the plain-text part

Dark mode is applied in three ways depending on the client: no change, partial inversion of light backgrounds, or full inversion of both backgrounds and text. You cannot fully control the last two. Protect your design by using transparent PNG logos with a light outline or padding so they survive on dark backgrounds, avoid pure black text on pure white (dark grey on off-white inverts more gracefully), and add a prefers-color-scheme media query for clients that support it.

Gmail clips messages whose HTML exceeds about 102 KB and shows a "View entire message" link. Anything after the cut, often including the unsubscribe link and tracking pixel, is hidden. Keep HTML lean: remove comments, avoid repeated inline styles where you can, and do not embed images as base64.

Always send a multipart message with a plain-text alternative. Some readers prefer it, some devices show it, and a missing or empty text part is a minor spam signal. Most sending platforms generate one automatically, but check that it reads sensibly and includes the real links.

Accessibility and deliverability basics

Accessible email is mostly good HTML: set lang and dir on the html element, use real headings and paragraphs inside cells, keep body text at 14 to 16 px or larger, maintain at least 4.5:1 contrast for text, write link text that makes sense out of context ("Track your order", not "Click here"), and keep the reading order logical when columns stack.

Even a perfect template is wasted if it lands in spam. Since 2024, Gmail and Yahoo require bulk senders to authenticate their mail. The three DNS records involved are:

  • SPF: lists the servers allowed to send mail for your domain.
  • DKIM: adds a cryptographic signature so receivers can verify the message was not altered and really came from your domain. Your email platform gives you the record to publish.
  • DMARC: tells receivers what to do when SPF or DKIM fail (none, quarantine or reject) and where to send reports. Start at p=none, review reports, then tighten.
  • Bulk senders also need a one-click unsubscribe (List-Unsubscribe headers) and must keep spam complaint rates low. Treat DNS changes as production changes: record them, and know how to revert them.

A practical workflow

Start the layout in the Email Builder, which exports table-based HTML with inline styles and checks for common problems such as missing alt text, empty button links and a missing unsubscribe link. If your content starts life in a Word or Google Docs draft, run it through Word to HTML first to strip Office markup, then paste the clean text into your email blocks.

Before every send, write a preheader, replace merge tags with your platform’s syntax, check the HTML size against the Gmail clipping limit, and send tests to real Gmail, Outlook and Apple Mail accounts in light and dark mode. Previews in any builder are simulations; the inbox is the only real test.

More guides you might like

Ready to try it?

Open the free Email Builder and apply what you just read. No sign-up, nothing uploaded.

Open Email Builder β†’

← All guides