adjacent-001.xht (910B)
1 <?xml version="1.0" encoding="utf-8"?> 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <title>CSS Test: Selectors: Adjacent selectors without the space separator</title> 6 <link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" /> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#adjacent-selectors" /> 8 <link rel="match" href="adjacent-000-ref.xht"/> 9 <meta name="assert" content="Browsers should apply each rule to the adjacent element also without the space separator"/> 10 <style type="text/css"> 11 body > p {color: gray} 12 13 p+p {color: purple} 14 p+div {color: black} 15 div+h4 {color: blue} 16 17 </style> 18 </head> 19 <body> 20 <p>Filler text.</p> 21 <p>This text should be purple.</p> 22 <div>This text should be black.</div> 23 <h4>This text should be blue.</h4> 24 </body> 25 </html>