Description

E[attr^="something"] matches any element E with attribute 'attr' where the values starts exactly with 'something'. Common attributes include: title, alt, action, type, width.

See also:

  • Attribute selector []
  • Attribute selector contains [*]
  • Attribute selector ends with [$]
  • Attribute selector equal [=]
  • Attribute selector hyphen values [|]
  • Attribute selector in list [~]
  • attr()
Live Example
Play with the code in the textarea below.

Introduced in CSS version
3
Inherited
N/A
Browser Support
BrowsersIEFirefoxSafariOperaChrome
Versions71160.2
Belongs to:

See the full list CSS properties and browser support: CSS Properties