attribute-value-selector-010.html (1993B)
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-010-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 match hyphen-separated list"> 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[xml:lang |= "it"] { color:white;background-color:green; } 18 div[lang |= "ch"] { color:white;background-color:green; } 19 div[lang=" no"] { color:white;background-color:green; } 20 </style> 21 </head> 22 <body> 23 24 <div lang="es">This line should be green</div> 25 <div lang="es-MX">This line should be green</div> 26 <div lang="ES">This line should be green</div> 27 28 <div lang="en-GB">This line should be green</div> 29 <div lang="en-GB-scouse">This line should be green</div> 30 31 <p lang="es">This line should be green <em>and this should be green too</em></p> 32 33 <div lang="no">This line should NOT be green</div> 34 <div lang="MX-es">This line should NOT be green</div> 35 36 <div lang="en-US">This line should NOT be green</div> 37 <div lang="en">This line should NOT be green</div> 38 39 <div lang="fr">This line should NOT be green<p>This line should NOT be green</p></div> 40 <p lang="de">This line should NOT be green <em>and this should not be green either</em></p> 41 </body> 42 </html>