attribute-value-selector-009.xht (2014B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 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-009-ref.html" /> 9 <meta name="flags" content="nonHTML"/> 10 <meta name="assert" content="lang attribute selector with 'att |= val' in XHTML should be case sensitive, and match hyphen-separated list"/> 11 <style type="text/css"><![CDATA[ 12 div[title |= "es"] { color:white;background-color:green; } 13 p[title |= "es"] { color:white;background-color:green; } 14 div[title |= "en-GB"] { color:white;background-color:green; } 15 p[title |= "fr"] { color:white;background-color:green; } 16 em[title |= "de"] { color:white;background-color:green; } 17 div[lang=" no"] { color:white;background-color:green; } 18 ]]></style> 19 </head> 20 <body> 21 22 <div title="es">This line should be green</div> 23 <div title="es-MX">This line should be green</div> 24 25 <div title="en-GB">This line should be green</div> 26 <div title="en-GB-scouse">This line should be green</div> 27 28 <p title="es">This line should be green <em>and this should be green too</em></p> 29 30 <div lang="no">This line should NOT be green</div> 31 <div title="ES">This line should NOT be green</div> 32 <div title="MX-es">This line should NOT be green</div> 33 34 <div title="en-US">This line should NOT be green</div> 35 <div title="en">This line should NOT be green</div> 36 37 <div title="fr">This line should NOT be green<p>This line should NOT be green</p></div> 38 <p title="de">This line should NOT be green <em>and this should not be green either</em></p> 39 40 </body> 41 </html>