Add your own HTML with the custom HTML block
Paste or write email HTML for what the other blocks cannot do. What is allowed, what is removed, and why dark mode is up to you.
Updated 3 min read
On this page
The Custom HTML block holds HTML you write or paste, for a layout or a piece of formatting the other blocks do not offer. Everything else about the email stays the same: your footer, your unsubscribe link, the checks before sending.
Add one
- Step 1: On Content, use the + between blocks and choose Custom HTML.
- Step 2: Write or paste your HTML into the box on the right. It holds up to 50 KB, and the size is shown under it.
- Step 3: Studio saves as you go. When something is removed, the panel says what, under Removed when saved.
- Step 4: Open Preview and test to see it as it is sent, in light and dark.
A custom HTML block goes between other blocks, not inside Two columns. Writing help never adds one and does not rewrite one.
What is kept
| Kind | Allowed |
|---|---|
| Text and formatting | p, br, strong, b, em, i, u, s, span, div, blockquote, hr, sup, sub, small, center, font, headings h1 to h4 |
| Lists | ul, ol, li |
| Links | a with href and title. The address must start with https://, http:// or mailto: |
| Images | img with src, alt, width and height. The address must start with https:// |
| Tables | table, thead, tbody, tfoot, tr, td, th, with width, cell padding and spacing, border, alignment, colspan, rowspan and background colour |
| Inline styles | Colour, background colour, font size, weight, style and family, text alignment and decoration, line height, letter spacing, padding, margin, borders, corner radius, width, height, display and vertical alignment |
What is removed
- Scripts, style sheets, frames, forms and their fields, embedded objects, video and audio, SVG and MathML, with everything inside them.
- Event handlers such as
onclickoronerror, and theidandclassattributes. - Links that are not
https://,http://ormailto:, such asjavascript:or a relative path. The words stay; the link goes. - Images that are not on
https://. - Styles that could load or run something, such as
url(...)orexpression(...), and any style property not in the list above. - Comments, and tags that are not in the list above. A tag that is not allowed is dropped, but the text inside it is kept.
Nothing is ever stored as you typed it: each save keeps only what passes, and the email is checked again when it is built for sending, so a removed script can never reach a reader.
Personalisation
Merge fields work here as in any block, in the words and inside link and image addresses: <p>Hi {{ name | there }}</p> or https://yourcompany.com/account?e={{ email }}. Each is filled in for every person when it is sent.
Dark mode is not automatic
The other blocks follow dark mode for you. Custom HTML does not: words with no colour of their own take your email's text colour, which turns light in dark inboxes, but any colour or background you write into the HTML stays exactly as written. A dark colour on the dark background, or a fixed white panel with light text, can become hard to read.
Checks before sending
Links and images in the block are checked like any others: placeholder addresses stop the send, and broken links, missing image descriptions and vague link words are pointed out. The check also notes when something was removed, and that dark mode is up to you.