This page is part of the CSS3.info CSS selectors test. See more info on CSS3 selectors.
: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
: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
:target {
}
<div></div>
The CSS selector should not match the div element, because it does not have an id