Attribute selector

The attribute selector ([attr]) targets elements with this specific attribute.

Estimated Support About

39.02% + 34.15% = 73.17%


This page reflects support for different syntaxes: [attr], [attr="value"], [attr~="value"], [attr|="value"], [attr^="value"], [attr$="value"], [attr*="value"].

  • 1

    Partial. Can not be used with a class selector (.test[class]). Must be used solo ([class]) or with an element selector (td[class]).

  • 2

    Partial. Only supports [attr], [attr=value], [attr~=value], [attr|=value] syntaxes.

  • 3

    Buggy. A class="test" in the HTML is prefixed class="x_test", but an attribute selector stays unprefixed [class="test"].

  • 4

    Partial. Only supports [attr=value] syntax.

  • 5

    Partial. Only supports [attr~=value] syntax. Only class as an attribute name is known to be supported.

  • 6

    Partial. Doesn’t work with non Google accounts.


Know something we don't?

Is any of the above data outdated? Or do you want to add a new email client to the list? Heads on to GitHub and edit the data file!

Not comfortable with GitHub? Send us an email.

Test it yourself

This feature was last tested on December 15, 2020.

If you want to test this feature in the same conditions as we did, you can get our test code and run a test by yourself. Make sure to follow our testing recommendations first.