CSS pseudo class :lang

The :lang pseudo-class can used to select elements based on language.

Example – css :lang

This example show french language content in different color.

<style type="text/css">
:lang(fr) {
  background-color: lightgreen;
}
</style>

<p>Normal text</p>
<p lang="fr">Je suis français.</p>
refresh

Specification

Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit

Comments

Click here to write/view comments