:lang() Pseudoclass

Test of Filter

This text will be green if the rule has been applied.

Code Syntax


#testElement:lang(en) {
   color: #00cc00;
   }
         

Browser Support / Behaviour

Applied By

Not Applied By

Unknown

Special Notes

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.

More information