Attribute selector hyphen values [|]

E[attr|="something"] matches any element E with attribute attr where the hyphen-separated list of values beginning with something,

See also:

  • Attribute selector []
  • Attribute selector contains [*]
  • Attribute selector ends with [$]
  • Attribute selector equal [=]
  • Attribute selector in list [~]

Attribute selector contains [*]

E[attr*="something"] matches any element E with attribute 'attr' where the value contains the substring 'something'.

See also:

  • Attribute selector []
  • Attribute selector ends with [$]
  • Attribute selector equal [=]
  • Attribute selector hyphen values [|]
  • Attribute selector in list [~]

Attribute selector ends with [$]

E[attr$="something"] matches any element E with attribute 'attr' where the values ends exactly with 'something'.

See also:

  • Attribute selector []
  • Attribute selector contains [*]
  • Attribute selector equal [=]
  • Attribute selector hyphen values [|]
  • Attribute selector in list [~]

Attribute selector starts with [^]

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 in list [~]

E[attr~="something"] matches any element E with attribute 'attr' that has a list of space seperated values where one is equal to 'something'.

See also:

  • Attribute selector []
  • Attribute selector contains [*]
  • Attribute selector ends with [$]
  • Attribute selector equal [=]
Syndicate content