HTML
Learn how to include raw HTML content in your documents.
AI-assisted, human-approvednovem uses AI to review and keep our documentation up to date.
Available in: documents and e-mails.
{{ html }}
<div style="text-align: center;">
<strong>Custom HTML content</strong>
</div>
{{ /html }}
Overview
The HTML block sanitizes HTML before rendering. This is useful for content that can't be expressed in standard markdown, such as complex tables, custom layouts or embedded widgets.
Use the built-in blocks for content they support. For example, use a table block for tabular data and layout blocks for document columns. Their references describe the options available in documents and e-mails.
Including HTML
The content between {{ html }} and {{ /html }} uses an allowlist of HTML
elements, attributes, and CSS properties. Scripts, event handlers, forms,
iframes, and CSS URL loads are removed. Rejected CSS properties produce
warnings. An authored id becomes data-id; safe links open in a new tab.
SVG is supported in documents and stripped with a warning in e-mails. Prefer simple HTML when the same content must work across formats.
Document variables such as $title resolve in text nodes. vis and image
blocks embedded inside HTML render in place on both surfaces. Other grammar
blocks and resource data pills are not supported inside HTML.
{{ html }}
<div style="padding: 12px; color: #336699">
<strong>$title</strong>
{{ vis ref: /u/novem_demo/p/nei, width: 100% }}
</div>
{{ /html }}
Examples
Custom styled table
{{ html }}
<table style="width: 100%; border-collapse: collapse;">
<tr style="background: #f0f4f8;">
<th style="padding: 8px; text-align: left;">Region</th>
<th style="padding: 8px; text-align: right;">Return</th>
</tr>
<tr>
<td style="padding: 8px;">North America</td>
<td style="padding: 8px; text-align: right; color: #16a34a;">+5.1%</td>
</tr>
<tr>
<td style="padding: 8px;">Europe</td>
<td style="padding: 8px; text-align: right; color: #dc2626;">+1.2%</td>
</tr>
</table>
{{ /html }}