← CSS Support Index

Does CSS Class selector Work in HTML Email?

The class selector (`.className`) allows to apply styles to a group of elements with the corresponding `class` attribute.

Quick Answer

Does Class selector work in HTML email?

The CSS Class selector property is supported in all major email clients tested. You can use it with confidence in your HTML emails.

Which Email Clients Support CSS Class selector?

CSS support for Class selector across email clients

Email ClientDesktopMobile / WebNotes
Gmail✓ Yes~ Partial—
Outlook (Windows)✓ Yes?—
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. Not supported with non Google accounts.
  • #2 Buggy. The first `<head>` in the HTML is removed, so `<style>` elements need to be in a second `<head>` element.

Frequently Asked Questions

Related CSS Properties

Test Your Email Now

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

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