c16-descendant-000

Descendant selectors (Contextual selectors)

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: Descendant selectors (Contextual selectors)</title>
 5   <link rel="help" href="http://www.w3.org/TR/REC-CSS1#contextual-selectors">
 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    p {color: green;}
11    li {list-style: none;}
12    html body div p {color: red;}
13    span, ul li li {color: green;}
14   </style>
15   <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#descendant-selectors" title="5.5 Descendant selectors">
16  </head>
17  <body>
18   <p> This line should be green. </p>
19   <ul>
20    <li>
21     <span> This line should be green. </span>
22     <ul>
23      <li> This line should be green. </li>
24     </ul>
25    </li>
26   </ul>
27  </body>
28 </html>