This page is part of the CSS3.info CSS selectors test. See more info on CSS3 selectors.

  1. h1 ~ p {
    }
    
    <h1></h1>
    <p></p>

    The CSS selector should match the paragraph because the header is in front of and directly adjecent to the paragraph

  2. h1 ~ p {
    }
    
    <h1></h1>
    <h2></h2>
    <p></p>

    The CSS selector should match the paragraph because the header is in front of the paragraph

  3. h1 ~ p {
    }
    
    <p></p>
    <h1></h1>

    The CSS selector should not match the paragraph because the paragraph is in front of the header