HTML and CSS Reference
In-Depth Information
Name
:lang
Applies to:
Any element with associated language-encoding information.
Description:
This matches elements based on their human-language encoding. Such language information
must be contained within or otherwise associated with the document; it cannot be assigned
from CSS. The handling of :lang is the same as for |= attribute selectors. For example, in
an HTML document, the language of an element is determined by its lang attribute. If the
document does not have one, the language of an element is determined by the lang attribute
of its nearest ancestor that does have one, and lacking that, by the Content-Language HTTP
header response field (or the respective meta http-equiv ) for the document.
Examples:
html:lang(en) {background: silver;}
*:lang(fr) {quotes: '« ' ' »';}
Search WWH ::




Custom Search