From W3C Wiki
< CSS‎ | Selectors
Jump to: navigation, search

Pseudo-classes :lang

The :lang(C) pseudo-class represents an element that is in language C. Whether an element is represented by a :lang() selector is based solely on the element's language value being equal to the identifier C, or beginning with the identifier C immediately followed by "-".


:lang(C){ properties }

Point, Note

  • "C" must be a valid CSS identifier and must not be empty. (Otherwise, the selector is invalid.)



   font-style: italic;


  <p>The man said <q lang="en">The quote is input here</q>.</p>

Css3 selectors lang.png

CSS defines the :lang pseudo-class in 6.6.3. The language pseudo-class :lang.