Skip to main content
The HTML element embeds raw HTML in your notification. Use it when the other Elemental elements cannot produce the structure or styling you need. The type value is "html". When to use:
  • Custom HTML structures (tables, complex layouts)
  • HTML that requires specific formatting not available in Elemental elements
  • Legacy HTML content that needs to be preserved
  • Custom styling that requires direct HTML/CSS
HTML elements only work on email. They do not render on push, SMS, or any other channel. Use standard Elemental elements for cross-channel content.
Basic example
Fields
string
required
The raw HTML. Any valid HTML markup, including CSS styles.
object
Region-specific content for localization. See the .
string[]
An array of channel names. The HTML element renders only for the listed channels. See .
Examples and variants Simple HTML Basic HTML content:
HTML table Create custom HTML tables:
HTML with Handlebars Use Handlebars variables in HTML:
HTML with localization Localize HTML content:
Channel-specific HTML Only render HTML for email:

Best practices

  • Use sparingly: prefer standard Elemental elements for cross-channel compatibility
  • Email only: HTML elements only work in email channels
  • Test thoroughly: HTML rendering varies across email clients. Test in several
  • Use inline styles: email clients often strip <style> tags, so use inline CSS
  • Keep it simple: complex HTML may not render correctly in all email clients
Channel support
  • Email: ✅ Full support
  • Push: ❌ Not supported
  • SMS: ❌ Not supported
  • Inbox: ❌ Not supported