Overview
You can add your own HTML to SmartrMail emails, but inboxes support much less HTML than web browsers do. Code that looks fine in a browser can break, disappear or show as plain text in an email.
This article lists what to avoid, what to use with care, and what to do instead. To add HTML to an email, see Add an HTML block.
What inboxes don’t support
Important: don’t use JavaScript, Flash, embedded audio or video, forms, layered <div> elements or <iframe> in your emails. Inboxes block them or show them broken.
What works in some inboxes only
These work in some inboxes and not others. Use them with care, and check your email in a few inboxes with Send test:
Background images
Custom web fonts
Embedded CSS in a <style> tag
Image maps
Wide layouts
What to do instead
JavaScript
Almost no email client runs JavaScript. SmartrMail doesn’t remove <script> tags from an HTML block, so they stay in your email’s code, but they never run. Their code can also show up as stray text in the preview text some inboxes show, and in the plain-text version of your email.
Instead: use an animated GIF to add movement.
iframes
An <iframe> shows content from another site inside a page. Almost no email client supports it.
Instead: link straight to the content.
Flash
Most email clients block Flash completely.
Instead: use an animated GIF.
Forms
Some email clients show form fields like text boxes and checkboxes, but people can’t submit them.
Instead: link to a form on your website or a Google Form.
Video and audio
Video and audio players need HTML5 <video> and <audio> tags, which very few email clients support.
Instead: for YouTube or Vimeo, use SmartrMail’s Video block. Paste the video link, and the email shows a thumbnail image that opens the video when clicked. For other video sources, add an image or animated GIF and link it to the video. See Add a video to your email.
FAQs
Click a question to open it.
Can I use background images in my emails?
Can I use background images in my emails?
With care. Background images don’t show in every inbox, so set a background color as well. See Adding a page background to your emails for which inboxes support them.
Will my JavaScript run in someone’s inbox?
Will my JavaScript run in someone’s inbox?
No. No major email client runs JavaScript, and the code may show up as text elsewhere in the email, so leave it out.
Does the Video block play the video inside the email?
Does the Video block play the video inside the email?
No. Everyone sees a thumbnail image. Clicking it opens the video on YouTube or Vimeo.
Need a hand with HTML in your emails?
Our team is happy to help. Book a 1:1 call with the SmartrMail team and we’ll set it up with you.
