c16-descendant-000.xht (1084B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 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 <link rel="match" href="c16-descendant-000-ref.xht" /> 9 10 <style type="text/css"><![CDATA[ 11 body {color: red;} 12 p {color: green;} 13 li {list-style: none;} 14 html body div p {color: red;} 15 span, ul li li {color: green;} 16 ]]></style> 17 <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#descendant-selectors" title="5.5 Descendant selectors"/> 18 </head> 19 <body> 20 <p> This sentence should be green. </p> 21 <ul> 22 <li> 23 <span> This sentence should be green. </span> 24 <ul> 25 <li> This sentence should be green. </li> 26 </ul> 27 </li> 28 </ul> 29 </body> 30 </html>