Skip to main content
The HTML element embeds raw HTML in your notification. Use it when the other Elemental elements can’t produce the structure or styling you need. It renders on email only. 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
Basic example
Fields
string
required
The raw HTML. Any valid HTML markup, including CSS styles.
object
Translations of content, keyed by locale code. See .
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
  • Test thoroughly: HTML rendering varies across email clients.
  • 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