Skip to content
Email Development

Interactive Elements in HTML Email: What Works Where

Interactive elements in HTML email: where hover, CSS tabs, AMP, GIFs, countdown timers, video and forms really work, with safe fallbacks and a code sample.

Keshur Gojiya

7 min read

Interactive Elements in HTML Email: What Works Where

Interactive elements in HTML email are possible, but each one works in a different set of email clients: hover effects in Apple Mail and most webmail, CSS tabs and accordions mainly in Apple Mail and Yahoo, AMP mainly in Gmail and Yahoo, and video almost only in Apple Mail. The safe way to use them is to build a complete static email first, then add interactivity as an extra layer that unsupported clients simply ignore. Here is where each technique works, and the fallback I use for each.

Hover effects: the safest interactivity in email

According to caniemail and Google's Gmail documentation, :hover works in Apple Mail and iOS Mail, Gmail on the web and in the Android app (with Google accounts), Yahoo Mail and Samsung Email. Outlook.com and new Outlook apply it only to plain element selectors such as a:hover. Classic Outlook for Windows and the Gmail iOS app ignore it. Gmail also removes transition and transform, so keep the effect to colour, background and underline changes.

Phones have no hover, so never put information only in a hover state. Use it as polish on a button that already works:

<style>
  .btn:hover { background-color: #0b57d0 !important; }
  .btn:hover a { text-decoration: underline !important; }
</style>

<table role="presentation" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td class="btn" bgcolor="#1a73e8" style="background-color:#1a73e8; border-radius:4px; padding:12px 24px;">
      <a href="https://example.com/sale" style="color:#ffffff; font-family:Arial, sans-serif; font-size:16px; font-weight:bold; text-decoration:none;">Shop the sale</a>
    </td>
  </tr>
</table>

The !important is needed because inline styles normally win over a <style> block. Clients that ignore :hover show the normal blue button, which is a complete fallback.

CSS tabs, accordions and carousels with checkboxes

Email tabs, accordions, carousels and "tap to reveal" swaps need no JavaScript. A hidden <input type="checkbox"> or <input type="radio"> sits before the content, the reader taps its <label>, and a CSS rule combining :checked with a sibling selector (+ or ~) shows, hides or swaps the content.

Support is narrow. In caniemail's tests, :checked works in Apple Mail on Mac and iPhone, Yahoo Mail, AOL, Samsung Email and Thunderbird, and only partly in Outlook.com and the Outlook mobile apps. Gmail removes every pseudo-class except :hover, so these effects do nothing anywhere in Gmail, and classic Outlook for Windows doesn't support form inputs at all.

Make the fallback the default: every panel or slide visible, stacked like a normal email. The common mistake is hiding content with a plain rule such as .panel { display: none; } and relying on :checked to reveal it. Gmail keeps the hiding rule, drops the revealing one, and the content is gone. Let only :checked hide things instead: start the checkbox checked, hide the panel with .toggle:checked + .panel { display: none; }, and the reader's tap unchecks it to open the panel. Clients that drop :checked simply show everything.

AMP for Email: real interactivity, limited reach

AMP for Email adds a third version of the message (a text/x-amp-html MIME part) next to the HTML and plain-text parts, with carousels, accordions, forms that submit inside the email and content that updates when it's opened.

It works in Gmail on the web (in supported browsers) and in the Gmail apps for Android and iOS, in Yahoo Mail on the web and in its apps, in AOL webmail, and in Mail.ru. Apple Mail and Outlook don't support it; Microsoft ended its Outlook.com AMP preview in 2020.

Before you can send it:

  • Register each sender address with Google. Google wants a real, production-quality email with the AMP part, sent from your production servers and authenticated with SPF, DKIM and DMARC. Registration is per sender address, not per domain, and Yahoo has its own.
  • Use an email platform that can send the AMP part. Not all of them can.
  • Keep a full HTML version. Gmail shows it whenever AMP can't be displayed, including once the email is more than 30 days old, and forwarding removes the AMP part.

You end up building and testing two emails, which makes sense for in-email booking, quizzes or live stock levels sent to a Gmail-heavy list, and rarely for a regular newsletter.

Animated GIFs: motion that works almost everywhere

Animated GIFs play in nearly every client, making them the most reliable way to add motion. The exception is classic Outlook for Windows: Outlook 2007 to 2013 shows only the first frame, and Microsoft 365 versions play GIFs by default but still show only the first frame when animations are switched off in Windows settings.

So put the key message and the call to action in the first frame, and keep the file small enough to load quickly on a phone.

Live countdown timers

A countdown timer is an image, not code: the <img> points to a server that draws a fresh GIF with the remaining time whenever the image is requested, so it works wherever images load.

Two caveats. Some clients cache images, Apple Mail Privacy Protection being the best-known case, so a reopened email can show an out-of-date count. And readers with images off see nothing. Always write the deadline in live text too ("Sale ends Friday at 6 pm GMT") and put it in the alt text.

Video in email

The <video> element plays in Apple Mail on Mac, in iOS Mail (only with the controls attribute, and without autoplay), in Samsung Email (with controls) and partly in Outlook for Mac. Gmail, classic Outlook, Outlook.com and Yahoo Mail don't play it.

The reliable approach is a still frame (or a short GIF) of the video with a play button drawn in, linked to the video page. Every reader sees it, and you can track the click.

Forms, polls and surveys in email

Forms are the riskiest interactive element. Classic Outlook doesn't support them. Outlook.com and new Outlook show the fields but don't submit them. Gmail submits on the web and in the Android app, but not in the iOS app with non-Google accounts. Readers have also learned to distrust emails that ask them to type in details.

A link-based poll does the same job in every client. Make each answer a separate link or button with the answer in its URL, and let the landing page record the vote. Some corporate security filters open links automatically before the reader does, so treat raw click counts with some caution.

When is an interactive email worth it?

Interactivity is worth it when it helps the reader act faster or shows more in less space: product tabs, an FAQ accordion, a before-and-after image swap, a countdown for a real deadline. It rarely is when most of your list will see the fallback, when the email is rebuilt every week, or when the effect is decoration.

A simple test: if the interactive part vanished, would the email still do its job? It must. For most HTML email templates I build, the interactivity that earns its place is a hover state on buttons and a GIF with its message in the first frame.

How to test interactive emails

Screenshot services capture still images, so they show the fallback but not the interaction. Test with real sends: hover in Gmail on the web and Apple Mail on a Mac, taps on an iPhone, and the fallback in the Gmail apps and classic Outlook, where nothing should be hidden or broken.

Before sending, run the code through the HTML email checker. It flags forms, video, scripts and CSS that Gmail or classic Outlook ignore, so you know where your fallback will appear. For AMP, Gmail's developer settings (Settings, General, Dynamic email) let you allow a sender and test AMP emails in your own account before registering.

FAQ

Can you use JavaScript in an HTML email?

No. Email clients don't run JavaScript inside messages, for security reasons. Interactivity in email comes from CSS, AMP, images generated on the fly, or links to a web page.

Can I embed a YouTube video in an email?

Not as a playable player in the clients most people use. Link a thumbnail with a play button to YouTube or a landing page instead. If your audience is mostly Apple Mail, an HTML <video> with an image fallback is an option.

Is AMP for Email still supported?

Yes. Google's developer documentation still covers AMP for Email in Gmail on the web, Android and iOS, and Yahoo supports it in Yahoo Mail and AOL webmail. Outlook and Apple Mail don't, so every AMP email still needs a complete HTML version.

Key takeaways

  • Build the static email first; interactivity is an extra layer that must fail gracefully.
  • Hover effects and animated GIFs are the safest choices; put the GIF's key message in its first frame.
  • CSS checkbox effects skip Gmail and classic Outlook entirely, and AMP needs registration and a second version.
  • Replace video and forms with linked images and link-based polls to reach every reader.

Tags

  • HTML Email
  • Email Development
  • CSS
  • Best Practices

About Keshur Gojiya

Web developer and HTML email specialist with 6+ years of experience, building websites and emails for businesses, startups and agencies.

Get to know me
Keep Reading
View All Articles
  • Email Development

    7 min read

    Images and Fonts in HTML Email: Best Practices

    Best practices for images and fonts in HTML email: safe formats, retina sizing, alt text, which clients load web fonts, and the Outlook Times New Roman fix.

    • HTML Email
    • Email Development
    Keshur Gojiya
  • Email Development

    7 min read

    Dark Mode HTML Email: How to Code, Design and Test

    A dark mode HTML email guide: how Apple Mail, Gmail and Outlook recolour emails, the meta tags and CSS that work, and how to design and test for both modes.

    • HTML Email
    • Dark Mode
    Keshur Gojiya
  • Email Development

    6 min read

    CSS Support in Email Clients: What Works Where

    CSS support in email clients explained: what Gmail, Outlook and Apple Mail keep, why Gmail drops your CSS, and the fallbacks that keep layouts intact.

    • HTML Email
    • CSS
    Keshur Gojiya

Need help with an email or website?

If an email is breaking in Outlook or dark mode, or you have a design that needs building, tell me about it and I’ll reply with next steps.

Email me