MailViewr - Free HTML Email Preview Tool
← CSS Support Index

Does CSS CSS comments Work in HTML Email?

Adds explanatory notes to the code or to prevent the browser from interpreting specific parts of the style sheet

Quick Answer

Does CSS comments work in HTML email?

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

Which Email Clients Support CSS CSS comments?

CSS support for CSS comments across email clients

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

Notes

  • #1 Buggy. The first <head> in the HTML is removed, so comment needs to be in the `<style>` tag of a second `<head>` element.
  • #2 Partial. `<style>` tag not supported with non-google account. Comment inside `style:` attribute works.
  • #3 Partial. Comment inside `<style>` tag works. Comment inside `style` attribute strips the whole attribute.
  • #4 Partial. `<style>` tag not supported. Comment inside `style:` attribute works.
  • #5 Partial. Comment inside `style` attribute works.
  • #6 Not supported. The entire rule is removed within a `<style> element. The entire inline `style` attribute is removed.

Frequently Asked Questions

Test Your Email Now

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

Open Email Previewer