Version: Level 2
Compability: Currently not supported by any browser.
The lang pseudo-class is used to apply style to the contents of an element which is written in a foreign language. You must declare the language code be enclosing the language code within a pair of parentheses.
The language code is set by the ISO 639 and RFC 1776 standards.
You can select the language for the element or document by:
<html>
<head>
<title>lang test</title>
<style type="text/css">
p:lang(fr) {color: red;}</style>
</head>
<body>
<p lang="fr">
Bonjour le monde!
</p>
</body>
</html>Bonjour le monde!Simulated output.