css3-modsel-22.xml (1055B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>:lang() pseudo-class</title> 5 <style type="text/css"><![CDATA[ul > li { background-color : red } 6 li:lang(en-GB) { background-color : lime }]]></style> 7 <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/> 8 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 9 <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found --> 10 </head> 11 <body> 12 <ul> 13 <li lang="en-GB">This list item should be green because its language is 14 British English</li> 15 <li lang="en-GB-wa">This list item should be green because its language 16 is British English (Wales)</li> 17 </ul> 18 <ol> 19 <li lang="en-US">This list item should NOT be green because its language 20 is US English</li> 21 <li lang="fr">This list item should NOT be green because its language is 22 French</li> 23 </ol> 24 </body> 25 </html>