The CSS reference

":lang" - css pseudo-class (v. css 2)

  • Will add a style to an element with a specific lang attribute
  • HTML usage: all elements
  • Browsers that support the :lang - pseudo-class :
    Internet Explorer Mozilla Firefox Opera Google Chrome Apple Safari

Pseudo-class ":lang" example:

<!DOCTYPE HTML >
<html  >
  <head>
  <title>Test</title>
  <style type="text/css">
    q:lang(de) { background-color: #D0D0D0; }

  </style>
</head>
<body>
  <p>A German woman asked me where she could find
  <q lang="de">das nächste Kaffeehaus</q>,
   but I did not know about anyone.
  </p>
  <p><b>Note:</b> For :lang pseudo class to work in
      IE, a DOCTYPE must be declared.</p>
</body>
</html>
© 2010 by Finnesand Data. All rights reserved.
This site aims to provide FREE programming training and technics.
Finnesand Data as site owner gives no warranty for the correctness in the pages or source codes.
The risk of using this web-site pages or any program codes from this website is entirely at the individual user.