← CSS Support Index

Does CSS :first-child Work in HTML Email?

Selects an element that is the first child of its parent.

Quick Answer

Does :first-child work in HTML email?

The CSS :first-child 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 :first-child?

CSS support for :first-child 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

Related CSS Properties

Test Your Email Now

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

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