class-002

Selectors: Class selectors: Multiple classes

WeasyPrint

This browser

Assertion
Browsers should apply each rule to the elements which have the specified class or classes

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: Selectors: Class selectors: Multiple classes</title>
 5   <link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com">
 6   <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#class-html">
 7   <meta name="flags" content="">
 8   <meta name="assert" content="Browsers should apply each rule to the elements which have the specified class or classes">
 9 <style type="text/css">
10 .foo {color: fuchsia}
11 .foo.moo {border: thin solid;}
12 h4.title {color: blue; border: none;}
13 
14 </style>
15  </head>
16  <body>
17 <p class="foo">This text should be fuchsia.</p>
18 <div class="foo moo">This text should be fuchsia with a thin fuchsia border.</div>
19 <h4 class="title moo">This text should be blue without any border.</h4>
20  </body>
21 </html>