The lang pseudo-class will match the elements based on the document language. This could be set via the
lang HTML attribute, an
<meta> information and it's similar to the CSS2 lang pseudo-class selector. The difference is the newly introduced wildcard selector which allows to select more languages at once.
/* declarations */
While all elements with a language attribute that indicates English will have a red color, the French text will keep its default color.Try example in CodePen
# Browser support
# Usage statistics (Alexa Top 1,250,000 sites)
Due to an extreme price increase of our statistics provider the data collection was stopped in September 2018.