← CSS Support Index

Does CSS :target Work in HTML Email?

Styles an element that is the current URL fragment target.

Quick Answer

Does :target work in HTML email?

The CSS :target property is supported in Outlook (Mac / Web), Yahoo! Mail, Samsung Email, Thunderbird, and others. It is NOT supported in Gmail, Outlook (Windows), Apple Mail, and others. Always include a safe fallback for unsupported clients.

Which Email Clients Support CSS :target?

CSS support for :target across email clients

Email ClientDesktopMobile / WebNotes
Gmail✗ No✗ No—
Outlook (Windows)✗ No?—
Outlook (Mac / Web)✓ Yes✓ Yes—
Apple Mail✗ No✗ No—
Yahoo! Mail✓ Yes✓ Yes—
Samsung Email?✓ Yes—
Thunderbird✓ Yes?—
ProtonMail✗ No✓ Yes—
Fastmail✗ No?—

Notes

  • #1 Partial. Only supported on type selectors.
  • #2 Buggy. Not filtered but doesn't work.

Frequently Asked Questions

Test Your Email Now

Paste your HTML and see how it renders in clients that don't support
:target.

Open Email Previewer

Building a new email instead of checking an existing one? MailViewr's Email Builder only lets you use CSS that's known to render across clients, so :target can't sneak into your markup by accident. Open the Email Builder →