css3-modsel-8.xml (1003B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>Attribute value selectors (hyphen-separated attributes)</title> 5 <style type="text/css"><![CDATA[p { background-color : red } 6 p[lang|="en"] { background-color : lime } 7 address { background-color : red } 8 address[lang="fi"] { background-color : lime } 9 span[lang|="fr"] { background-color : red }]]></style> 10 <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/> 11 <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found --> 12 </head> 13 <body> 14 <p lang="en-gb">This paragraph should have green background because its language is "en-gb"</p> 15 <address lang="fi"> 16 <span lang="en-us">This address should also</span> 17 <span lang="en-fr">have green background because the language of the inner SPANs 18 is not French.</span> 19 </address> 20 </body> 21 </html>