The HTML content block supports specific HTML tags and attributes for security and email client compatibility. Use this reference when building custom code.
Structure Requirements
Parent Div Rule
Each HTML block must contain one parent <div> tag. If your code has multiple divs at the same level, wrap them:
✅ Correct:
<div> <div>Content 1</div> <div>Content 2</div> <div>Content 3</div> </div>
❌ Incorrect:
<div>Content 1</div> <div>Content 2</div> <div>Content 3</div>
Allowed HTML Tags
The following tags are supported in HTML blocks:
a, abbr, acronym, address, area, b, bdo, big, blockquote, button, caption, center, cite, code, colgroup, dd, del, dfn, dir, div, dl, dt, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, i, ins, kbd, label, legend, li, map, menu, ol, optgroup, option, p, pre, q, s, samp, select, small, span, strike, strong, sub, sup, table, tbody, td, textarea, tfoot, th, thead, tr, tt, u, ul, var
Allowed Attributes by Tag
General Attributes
These attributes work on most tags:
style, id, class, data-*, title
Tag-Specific Attributes
Links (<a>):
href, name, target
Images (<img>):
align, alt, border, height, hspace, src, vspace, width, usemap
Tables (<table>):
align, bgcolor, border, cellpadding, cellspacing, width
Table Body (<tbody>):
align, valign
Table Cells (<td>):
align, bgcolor, colspan, height, rowspan, valign, width
Table Rows (<tr>):
align, bgcolor, valign
Table Footer (<tfoot>):
align, valign
Table Headers (<th>):
align, bgcolor, colspan, height, rowspan, valign, width
Table Head (<thead>):
align, valign
List Items (<li>):
type
Image Maps (<map>):
name
Map Areas (<area>):
alt, coords, href, shape, target
Why These Restrictions?
HTML in emails must pass through security filters and work across dozens of email clients. These limitations ensure:
- Security: Prevents malicious code from reaching recipients
- Compatibility: Focuses on widely-supported HTML elements
- Deliverability: Helps emails avoid spam filters
Troubleshooting
My HTML isn't rendering:
- Check that all tags are from the allowed list
- Verify you have only one parent
<div>tag - Ensure all attributes are supported for that specific tag
My styles aren't applying:
- Use inline styles with the
styleattribute - Avoid external stylesheets or
<style>tags - Test across multiple email clients