CSS3 New Attribute Selectors

Attribute selectors select an element using the presence of a given attribute or attribute value.
  • [attr~=value] – Represents an element with an attribute name of attr whose value is a whitespace-separated list of words, one of which is exactly “value”.
  • [attr|=value] – Represents an element with an attribute name of attr. Its value can be exactly “value” or can begin with “value” immediately followed by “-” (U+002D). It can be used for language subcode matches.
  • [attr^=value] – Represents an element with an attribute name of attr and whose value is prefixed by “value”.
  • [attr$=value] – Represents an element with an attribute name of attr and whose value is suffixed by “value”.
  • [attr*=value] – Represents an element with an attribute name of attr and whose value contains at least one occurrence of string “value” as substring.

Go To- Certified CSS3 Developer Tutorial

Share this post
[social_warfare]
Advanced Pseudo-Classes
CSS3 New Pseudo Classes

Get industry recognized certification – Contact us

keyboard_arrow_up