Simple Language Selection : lang « CSS « HTML / CSS






Simple Language Selection

 


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>HTML/XHTML:  &raquo; Simple Language Selection</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<style type="text/css">
*:lang(fr) {color: blue;}
*:lang(en) {color: red;}
</style>

</head>
<body>

<div class="head">Simple Language Selection</div>
<div class="content">
  <p lang="en">Howdy partner, this is some wild west English in red.</p>
  <p lang="fr">C'est francais et bleu!</p>
  <p lang="en-uk">Jolly good old chap, this is English too so it's red.</p>
  <p>Document default is English so I am red as well.</p>
</div>

</body>
</html>

   
  








Related examples in the same category