CSS 3 Module | <== Test # ==> | |
---|---|---|
W3C Selectors | 8 of 19 of the interactive tests category | |
Testing | Date | Revision |
:target pseudo-class (ID #21) | 2001-11-03 | 1.1 |
NOTE: User interaction is required for this test.
This paragraph should be unstyled. The background of the following paragraph should become green when you follow this link.
This paragraph should initially be unstyled. It should become green when you select the link above. When you select this link, it should return to being unstyled and the background of the paragraph below should become green.
This paragraph should initially be unstyled. It should become green when you select the link above. When you follow this link, the three paragraphs should all return to being unstyled.
p:target { background-color : lime }
<p id="first">This paragraph should be unstyled. The background of the following paragraph should become green when you follow <a href="#second">this link</a>.</p> <p id="second">This paragraph should initially be unstyled. It should become green when you select the link above. When you select <a href="#third">this link</a>, it should return to being unstyled and the background of the paragraph below should become green.</p> <p id="third">This paragraph should initially be unstyled. It should become green when you select the link above. When you follow <a href="#missing">this link</a>, the three paragraphs should all return to being unstyled.</p>