Table-based HTML with inlined CSS

Email Template Builder

Stack header, text, image, button, divider, column and footer blocks, then download email HTML built from nested tables with inlined styles, a dark-mode rule set and a stacking mobile layout. The preview renders only the markup this page generates.

Template settings

Blocks (4 of 40)

1. Header: Your brand
2. Text: A headline that says the point
3. Button: Read more
4. Footer

Add a block

Output

The preview runs in a sandboxed frame without scripts, and links are disabled in it. The dark preview applies the dark rule set directly, since a page cannot force a frame to prefer dark mode.

Load a saved design

A .json file saved from this page

HTML size
6.1 KB
Gmail clips past 102 KB
Blocks
4
Width
600 px
Checks to fix
0

Email Template Builder

Operator: Abdulla Al Fahad. How tools are built and checked

Email clients are not browsers. The desktop versions of Outlook for Windows render with Word's engine and ignore much modern CSS, and a div-based layout that looks perfect in Chrome can collapse there. The dependable format is still nested tables with styles written onto each element, and that is what this builder produces from seven block types.

Header, text, image, button, divider, columns and footer blocks stack in the order you set. The page writes a table layout 600 px wide by default (480 to 700 px allowed), puts the base typography in a style block, runs a CSS inliner over it, and leaves the @media rules for the phone layout and dark mode in the head, where they have to live.

Everything you type is escaped, every address is checked against an allow-list, and the preview shows only markup this page generated, inside a frame that cannot run scripts.

Key features

  • Seven blocks: header with an optional logo, text with bold and links, image, button, divider, two or three columns, and a footer with an unsubscribe link
  • CSS inlined into style attributes, with client-support notes for the properties you used shown under the preview
  • Dark-mode support: color-scheme meta tags and a prefers-color-scheme rule set, plus an Outlook.com variant
  • Phone stacking at the container width plus 20 px, previewed at desktop width or 375 px
  • Hidden preheader text, a plain-text version and a warning at Gmail's 102 KB clipping point
  • Save the design as JSON, load it back later, and download the finished HTML

What the generated HTML contains

Links must be http, https, mailto or tel, and image addresses http or https only. The footer's unsubscribe field also accepts a merge tag such as {{unsubscribe_url}}, *|UNSUB|* or %%unsubscribe%%. A bare address such as example.com/offer becomes https://example.com/offer, while javascript:, data: and every other scheme is refused with a note instead of being written into the file. Colours must be hex values, fonts come from six web-safe stacks and sizes are clamped to sensible ranges.

A text block takes blank lines as paragraph breaks, **bold** and [label](https://url); everything else is escaped, so angle brackets and ampersands appear as typed. A text block holds 5,000 characters, a design 40 blocks, and the document title, preheader and button label are limited to 150, 200 and 80 characters.

How it works

The layout is built from role=presentation tables: a full-width background table, a centred container wrapped in an Outlook-only conditional comment so the width holds, then one row per block. A button is a link with padding inside a table cell that carries the background colour, so the colour survives clients that ignore padding on links; Outlook for Windows may still shrink the clickable area to the label.

The generated source goes through the inliner: class rules for typography become style attributes, while the @media blocks for the phone layout and dark mode stay in the head because a media query cannot be inlined. If inlining fails in a browser, the HTML keeps its style block, and a message tells you inlining did not happen.

Typical uses

  • A founder builds a monthly update: header with logo, one text block, a three-column row of feature summaries, a button and a footer using {{unsubscribe_url}}. On a phone the three columns stack into one at widths up to 620 px.
  • A developer needs a transactional template at 480 px wide in Georgia, keeps the saved design JSON in the repository, and reloads it whenever the brand colour changes.
  • A designer hands the exported HTML and the plain-text file to the client's email service, which sends them as the HTML part and the text part of one message.

Building one

  1. Set the document title, preheader, width, font and colours under Template settings.
  2. Add blocks and fill in their fields, using Up, Down, Duplicate and Delete on each block.
  3. Check the preview at desktop and 375 px width, and again with the dark-mode preview ticked.
  4. Read the checks list for missing alt text, invalid links and a missing footer.
  5. Compare the HTML size with Gmail's 102 KB point.
  6. Download the HTML and the plain-text version, or copy them, and save the design JSON to edit later.

Example

A product-launch email: header, a banner image pasted without its scheme or alt text, a text block, a button and a footer

Image block: URL example.com/banner.png, alt text empty
Button block: label Read more, link example.com/offer

What the HTML and the checks list say

The image is written with src="https://example.com/banner.png" and alt="".
The button is written with href="https://example.com/offer".
Checks: Block 2 (image): add alt text, since many clients block images by default.

Things to check before you rely on it

The preview is a browser rendering. Outlook for Windows, Gmail and Apple Mail each handle the same HTML differently, so send a test to real inboxes: the preview shows structure and the dark rules, not each client's quirks.

Dark mode differs by client: some invert colours on their own, some ignore prefers-color-scheme, some apply it to parts of the message. A logo with a white background stays a white box on the dark card.

Images are referenced, not embedded. You host them, many clients block them until the reader allows them, and the preview loads them from your server unless you clear the images box.

A button is a link inside a coloured cell, not a VML button. Outlook for Windows ignores the corner radius and may shrink the click area to the label, so keep labels short.

  • Type the unsubscribe merge tag exactly as your sending tool writes it. The builder passes {{ }}, *| |* and %% %% tags through unchanged and refuses anything else that is not a URL.

Common errors and how to fix them

"Block 4 (button): "javascript:alert(1)" is not an allowed link (use http, https, mailto or tel)."
Links and button addresses may use only http, https, mailto and tel. Any other scheme, including javascript: and data:, is refused, the button is written with href="#" and the next check warns that it goes nowhere. Enter a real address and both messages clear.

Best practices

  • Keep a postal address and a working unsubscribe link in the footer. CAN-SPAM in the US asks for both in commercial email, and the builder warns when there is no footer or no unsubscribe link. Gmail and Yahoo also ask bulk senders for one-click unsubscribe, but that is a List-Unsubscribe header (with List-Unsubscribe-Post) added by your sending tool when it sends the message. A link in the HTML footer does not satisfy it, and this builder writes only the HTML body.
  • Send the exported file through your real sending tool to yourself first, and open it in Outlook for Windows, Gmail and on a phone before the campaign goes out.

What the dark-mode rules change

With dark mode on, the head gets the color-scheme and supported-color-schemes meta tags and a prefers-color-scheme: dark block that sets the page to #111113, the card, footer and a matching header to #1c1c1f, text to #e4e4e7, links to #93b4ff and dividers to #3f3f46. Rules scoped to [data-ogsc] and [data-ogsb] cover the attributes Outlook.com uses for its own dark mode.

A header with its own background colour, and every button, keep the colours you chose; only elements that follow the card colour switch.

Frequently asked questions

Can I paste my own HTML into it?

No. The builder writes its own markup from the blocks, which is how it can guarantee that every string is escaped and every address checked. To inline CSS in HTML you already have, use Email CSS Inliner here.

Why does the exported HTML contain tbody elements and a rewritten head?

The inliner passes the markup through the browser's HTML parser, which adds tbody inside tables and normalises attributes. Email clients ignore the difference, and the conditional comments for Outlook are kept.