CSS :lang() Pseudo-class
Example
Style any <p> element with a lang attribute value of "it" (Italian):
p:lang(it)
{
background-color: yellow;
font-style: italic;
}
Try it Yourself »
Definition and Usage
The :lang()
pseudo-class
is used to select elements with a lang attribute with
the specified value.
Note: The lang attribute value is most often a two-letter language code, like lang="fr" (for French), or two language codes combined, like lang="fr-ca" (for Canadian French).
Version: | CSS2 |
---|
Browser Support
The numbers in the table specifies the first browser version that fully supports the pseudo-class.
Pseudo-class | |||||
---|---|---|---|---|---|
:lang() | 4.0 | 8.0 | 2.0 | 3.1 | 9.6 |
CSS Syntax