Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<head>
<title>CSS Test: Selectors: Adjacent selectors without the space separator</title>
<link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" />
<link rel="match" href="adjacent-000-ref.xht"/>
<meta name="assert" content="Browsers should apply each rule to the adjacent element also without the space separator"/>
<style type="text/css">
body > p {color: gray}
p+p {color: purple}
p+div {color: black}
div+h4 {color: blue}
</style>
</head>
<body>
<p>Filler text.</p>
<p>This text should be purple.</p>
<div>This text should be black.</div>
<h4>This text should be blue.</h4>
</body>
</html>