← CSS Support Index

Does CSS :only-of-type Work in HTML Email?

Selects an element that is the only one of its type among siblings.

Quick Answer

Does :only-of-type work in HTML email?

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

Which Email Clients Support CSS :only-of-type?

CSS support for :only-of-type across email clients

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

Notes

  • #1 Partial. Only supported on type selectors.

Frequently Asked Questions

Test Your Email Now

Paste your HTML and see how it renders in clients that don't support
:only-of-type.

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 :only-of-type can't sneak into your markup by accident. Open the Email Builder →