attribute-value-selector-007.html (1985B)
1 <!DOCTYPE html> 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 <link rel="match" href="attribute-value-selector-007-ref.html" /> 9 <meta name="flags" content="HTMLonly"> 10 <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"> 11 <style type="text/css"> 12 div[lang = "es"] { color:white;background-color:green; } 13 p[lang = "es"] { color:white;background-color:green; } 14 div[lang = "en-GB"] { color:white;background-color:green; } 15 p[lang = "fr"] { color:white;background-color:green; } 16 em[lang = "de"] { color:white;background-color:green; } 17 div[lang = "ch"] { color:white;background-color:green; } 18 div[lang=" no"] { color:white;background-color:green; } 19 </style> 20 </head> 21 <body> 22 23 <div lang="es">This line should be green</div> 24 <div lang='es'>This line should be green</div> 25 <div lang="ES">This line should be green</div> 26 27 <div lang="en-GB">This line should be green</div> 28 29 <p lang="es">This line should be green <em>and this should also be green</em></p> 30 31 <div lang="no">This line should NOT be green</div> 32 <div lang="es-MX">This line should NOT be green</div> 33 <div lang="MX-es">This line should NOT be green</div> 34 <div lang="en-GB-scouse">This line should NOT be green</div> 35 <div lang="en-US">This line should NOT be green</div> 36 <div lang="en">This line should NOT be green</div> 37 <div lang="fr">This line should NOT be green<p>This line should NOT be green</p></div> 38 <p lang="de">This line should NOT be green <em>and this should not be green either</em></p> 39 40 41 </body> 42 </html>