01 A field guide to email development

Email HTML is
built differently.

Web pages can rely on modern layout tools. Emails travel through dozens of inboxes, so dependable code uses tables, inline styles, and careful fallbacks.

600px
Typical desktop width
Tables
Reliable layout system
Inline
Safest core CSS
Structure firstInline the essentialsDesign for blocked imagesTest real inboxesStructure firstInline the essentials

02 The anatomy

Think in nested
containers.

An email is a document shell containing one full-width wrapper, one centered container, and a stack of modular rows.

  1. 01

    Document shell

    Doctype, language, character set, viewport, title, and email-client fixes live here.

    <head>
  2. 02

    Hidden preheader

    A short inbox preview appears after the subject line, but stays hidden in the opened email.

    display:none; max-height:0; overflow:hidden; mso-hide:all;
  3. 03

    Outer wrapper

    A 100%-wide presentation table supplies the page background and centers the email.

    width="100%"
  4. 04

    Content container

    A fluid table with a 600px maximum keeps the message readable on desktop and mobile.

    max-width:600px
  5. 05

    Content modules

    Header, hero, copy, buttons, dividers, and footer become separate table rows.

    <tr><td>

03 Code lab

A reliable
starter skeleton.

Switch between four core pieces. The examples are intentionally small so the structure is easy to reuse.

email.html
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="color-scheme" content="light dark">
  <meta name="supported-color-schemes" content="light dark">
  <title>Email title</title>
  <style>
    @media screen and (max-width: 620px) {
      .container { width: 100% !important; }
    }
  </style>
</head>
<body style="margin:0; background:#f3f3f3;">
  <div style="display:none; max-height:0; overflow:hidden; mso-hide:all;">
    Inbox preview text goes here.
  </div>
  <table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
      <td align="center">
        <table role="presentation" width="600"
          cellpadding="0" cellspacing="0" border="0" class="container"
          style="width:600px; max-width:100%;">
          <tr>
            <td style="padding:32px;">Email content</td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</body>
</html>

04 CSS rules of thumb

Progressive enhancement,
not perfect parity.

Inbox engines disagree. Protect the message first, then add enhancements for clients that support them.

Do this

Inline the visual essentials.

  • Fonts, colors, spacing, and borders
  • Explicit image dimensions
  • Web-safe fallback font stacks
  • Large, easy-to-tap links and buttons
<img src="hero.jpg" width="600" height="280" alt="Explore our summer collection" style="display:block; width:100%; height:auto; color:#173f35; font:bold 18px Arial, sans-serif;">

Use carefully

Treat modern CSS as a bonus.

  • Flexbox and grid for core layout
  • Background images without fallback colors
  • Web fonts without safe alternatives
  • Hover states as the only interaction cue
Email support varies

The goal

One message, many renderers.

Apple Mail, Gmail, and Outlook can interpret the same code differently. A good build stays understandable everywhere—even when visual details change.

Apple MailGmailOutlook

05 The workflow

From brief to inbox.

  1. 01

    Plan

    Define the single goal, content hierarchy, and primary CTA.

  2. 02

    Build

    Create modules with tables and add essential inline styles.

  3. 03

    Adapt

    Add fluid widths, stacking classes, and mobile spacing.

  4. 04

    Test

    Check real clients, dark mode, images off, and live links.

  5. 05

    Send

    Review the plain-text version, tracking, and final audience.

06 Before you send

The five-minute
quality check.

Reliable email development is mostly disciplined checking. Walk through this list before every launch.

  • ContentSubject, preheader, dates, prices, and names are accurate.

  • AccessHeadings are logical, alt text is useful, and contrast is strong.

  • LayoutThe email works at 320px and still reads with images blocked.

  • LinksEvery CTA, logo, social link, and unsubscribe URL works.

  • FallbacksPlain text is present and the design degrades gracefully.

  • File sizeKeep the HTML under roughly 102KB so Gmail does not clip content or hide the unsubscribe link.