HTML element
The HTML element adds your own markup to a widget: an embed iframe, a custom table, a badge, or markup no other element provides. It's display-only: it has no action or automations.
Available on: all platforms.
<script> tags inside an HTML element don't run. The markup is inserted into the page as content, and browsers don't execute scripts added that way. Put JavaScript in the widget's custom JS (see Widget settings), which runs each time the widget is shown, or in an Execute JavaScript code automation on a button or form.
Options
Option | What it does | Values / default |
|---|---|---|
Code | The HTML to insert, in a code editor (open it full size for longer snippets) | <div>Your custom HTML goes here.</div> |
Style | Border, radius, shadow, opacity, size, margin, position; hover and focus states | — |
Device, Animation | See Widget elements | — |
Behavior details and limitations
- Published as written. The editor shows a sanitized preview, but your site gets the HTML exactly as you wrote it. Check it on your site with Preview and QA.
- Inline event handlers and <style> tags work like any other markup on your page. Prefer the widget's custom CSS for styles, so they're removed when the widget closes.
- Dynamic text works. Placeholders such as {visitor.firstName or 'there'} in text and in href or src attributes are replaced. See Dynamic text.
- Your site's CSS applies. Widgets render in your page, so theme styles for tags like table, a or p affect your markup. Use classes and the widget's custom CSS to override them.
- Third-party embeds that need a script to initialize (for example review widgets or Instagram embeds) won't initialize from this element. Use iframes, or initialize them from the widget's custom JS.
- Keep it valid. Unclosed tags can break the layout of the rest of the widget step.
Example
A size guide table in a popup opened by a Click trigger on a "Size guide" link:
<table class="size-guide">
<tr><th>Size</th><th>Chest (cm)</th></tr>
<tr><td>S</td><td>88–94</td></tr>
<tr><td>M</td><td>95–101</td></tr>
</table>