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

  1. :target {
    }
    
    <div id='target'></div>

    The CSS selector should match the div element, because its id is equal to the target fragment of the URL

  2. :target {
    }
    
    <div id='other'></div>

    The CSS selector should not match the div element, because its id is not equal to the target fragment of the URL

  3. :target {
    }
    
    <div></div>

    The CSS selector should not match the div element, because it does not have an id