CSS/Selectors/attribute selector/attribute$=value

From Web Education Community Group
< CSS‎ | Selectors
Jump to: navigation, search


This selector represents an element with the "attributename" attribute whose value ends with the suffix "val".


elementname[attributename$="val"]{ properties }

Point, Note

  • If "val" is the empty string then the selector does not represent anything.



   content: "(Note that is a link to PDF.)";


  <p>Go to <a href="http://www.example.com/example.pdf">documentation.</a><p>

Css3 selectors att 006.png

CSS defines the attribute selector in 6.3.2. Substring matching attribute selectors.