lang-pseudoclass-001.html (1629B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Test: :lang pseudoclass</title> 5 <link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org"> 6 <link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com"> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#lang"> 8 <link rel="match" href="lang-pseudoclass-001-ref.html" /> 9 <meta name="flags" content="HTMLonly" > 10 <meta name="assert" content=":lang pseudoclass in HTML should not be case-sensitive, and match a substring"> 11 <style type="text/css"> 12 div:lang(es) { color:white;background-color:green; } 13 p:lang(es) { color:white;background-color:green; } 14 p:lang(fr) { color:white;background-color:green; } 15 em:lang(de) { color:white;background-color:green; } 16 div:lang(en-GB) { color:white;background-color:green; } 17 </style> 18 </head> 19 <body> 20 21 <div lang="es">This line should be green</div> 22 <div lang="es-MX">This line should be green</div> 23 <div lang="ES">This line should be green</div> 24 25 <div lang="en-GB">This line should be green</div> 26 <div lang="en-GB-scouse">This line should be green</div> 27 28 <p lang="es">This line should be green <em>and this should be green too</em></p> 29 <div lang="fr"><p>This line should be green</p>This line should NOT be green</div> 30 <p lang="de">This line should NOT be green <em>but this should be green</em></p> 31 32 <div lang="MX-es">This line should NOT be green</div> 33 <div lang="en-US">This line should NOT be green</div> 34 <div lang="en">This line should NOT be green</div> 35 </body> 36 </html>