1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <title>CSS Test: lang attribute selector - att=val</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#attribute-selectors">
8 <meta name="flags" content="HTMLonly">
9 <meta name="assert" content="lang attribute selector with att=val in HTML should not be case sensitive, and should only match when att is exactly val">
10 <style type="text/css">
11 div[lang = "es"] { color:white;background-color:green; }
12 p[lang = "es"] { color:white;background-color:green; }
13 div[lang = "en-GB"] { 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 = "ch"] { color:white;background-color:green; }
17 div[lang=" no"] { color:white;background-color:green; }
18 </style>
19 </head>
20 <body>
21
22 <div lang="es">This line should be green</div>
23 <div lang="es">This line should be green</div>
24 <div lang="ES">This line should be green</div>
25
26 <div lang="en-GB">This line should be green</div>
27
28 <p lang="es">This line should be green <em>and this should also be green</em></p>
29
30 <div lang="no">This line should NOT be green</div>
31 <div lang="es-MX">This line should NOT be green</div>
32 <div lang="MX-es">This line should NOT be green</div>
33 <div lang="en-GB-scouse">This line should NOT be green</div>
34 <div lang="en-US">This line should NOT be green</div>
35 <div lang="en">This line should NOT be green</div>
36 <div lang="fr">This line should NOT be green<p>This line should NOT be green</p></div>
37 <p lang="de">This line should NOT be green <em>and this should not be green either</em></p>
38
39
40 </body>
41 </html>