Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<title>Descendant combinator</title>
<style type="text/css"><![CDATA[.white { background-color: transparent ! important; }
.green { background-color: lime; }
div.t1 p { background-color: red; }]]></style>
<link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
<link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
</head>
<body>
<div class="t1">
<p class="white">This paragraph should be unstyled</p>
<table>
<tbody>
<tr>
<td>
<p class="white">This paragraph should be unstyled</p>
</td>
</tr>
</tbody>
</table>
</div>
<table>
<tbody>
<tr>
<td>
<p class="green">This paragraph should have a green background</p>
</td>
</tr>
</tbody>
</table>
</body>
</html>