:lang() PseudoclassThis text will be green if the rule has been applied.
#testElement:lang(en) {
color: #00cc00;
}
In order for this filter to work in compliant browsers, there must be a lang attribute on an ancestor element of the one being styled (<body>, for instance). Note that the xml:lang attribute on the <html> tag will not trigger this rule. Also, the value of this lang attribute must be repeated between the parenthesis in the :lang() pseudoclass. This rule would probably become messy to implement and maintain in a multilingual document.