c14-classes-000

Class as selector

WeasyPrint

This browser

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3  <head>
 4   <title>CSS Test: Class as selector</title>
 5   <link rel="help" href="http://www.w3.org/TR/REC-CSS1#class-as-selector">
 6   <link rel="author" title="CSS1 Test Suite Contributors" href="http://www.w3.org/Style/CSS/Test/CSS1/current/tsack.html">
 7   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 8   <style type="text/css">
 9    body { color: red; }
10    div { color: green; }
11 
12    .one { color: green; }
13    .1 { color: red; }
14    .a1 {color: green;}
15    p.two { color: green; }
16    p.three { color: red; }
17   </style>
18   <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#class-html" title="5.8.3 Class selectors">
19  </head>
20  <body>
21   <p class="one"> This sentence should be green. </p>
22   <div> <p class="1"> This sentence should be green. </p> </div>
23   <p class="a1"> This sentence should be green. </p>
24   <p class="two"> This sentence should be green. </p>
25   <div> <pre class="three">This sentence should be green.</pre> </div>
26   <div> <ul> <li class="three">This sentence should be green. </li> </ul> </div>
27  </body>
28 </html>