css3-modsel-21.xml (1335B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>:target pseudo-class</title> 5 <style type="text/css"><![CDATA[p:target { background-color : lime }]]></style> 6 <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/> 7 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 8 <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found --> 9 <meta name="flags" content=" interact" /> 10 </head> 11 <body> 12 <p id="first">This paragraph should be unstyled. 13 The background of the following paragraph should become green when 14 you follow <a href="#second">this link</a>.</p> 15 <p id="second">This paragraph should initially be unstyled. 16 It should become green when you select the link above. When you select 17 <a href="#third">this link</a>, it should return to being unstyled and the 18 background of the paragraph below should become green.</p> 19 <p id="third">This paragraph should initially be unstyled. 20 It should become green when you select the link above. When you follow 21 <a href="#missing">this link</a>, the three paragraphs 22 should all return to being unstyled.</p> 23 </body> 24 </html>