descendant-selector-001

Selectors: Descendant selectors and universal selector

WeasyPrint

This browser

Assertion
Browsers should apply each rule to the descendant elements

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: Descendant selectors and universal selector</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#descendant-selectors">
 7   <meta name="flags" content="">
 8   <meta name="assert" content="Browsers should apply each rule to the descendant elements">
 9 <style type="text/css">
10 body * {border: thin solid orange}
11 body div {border: none}
12 div * {border: thin solid blue}
13 body h4 {border: none}
14 h4  * {border: thin solid fuchsia}
15 </style>
16  </head>
17  <body>
18 <p>This paragraph should have a thin orange border.</p>
19 <div><p>This paragraph should have a thin blue border.</p></div>
20 <h4><span>This text should have a thin fuchsia border.</span></h4>
21  </body>
22 </html>