css3-modsel-13.xml (957B)
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>Class selectors</title> 5 <style type="text/css"><![CDATA[li { background-color : red } 6 .t1 { background-color : lime } 7 li.t2 { background-color : lime } 8 .t3 { background-color : red }]]></style> 9 <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/> 10 <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found --> 11 </head> 12 <body> 13 <ul> 14 <li class="t1">This list item should have green background because its class is "t1"</li> 15 <li class="t2">This list item should have green background because its class is "t2"</li> 16 <li class="t2"> 17 <span class="t33">This list item should have green background because 18 the inner SPAN does not match SPAN.t3</span> 19 </li> 20 </ul> 21 </body> 22 </html>