c16-descendant-002

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: 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    p {color: green;}
10    html body div {color: red;}
11   </style>
12   <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#descendant-selectors" title="5.5 Descendant selectors">
13  </head>
14  <body>
15   <div><p> This line should be green. </p></div>
16  </body>
17 </html>