specificity-012.xht (1097B)
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>CSS Test: Pseudo-class Specificity</title> 5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 6 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/cascade/specificity/002.html" type="text/html"/> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#specificity" /> 8 <link rel="help" href="http://www.w3.org/TR/css3-selectors/#specificity" /> 9 <link rel="help" href="http://www.w3.org/TR/selectors4/#specificity" /> 10 11 <meta name="flags" content="history interact" /> 12 13 <style type="text/css"> 14 a:link { color: yellow; background: red; } 15 a:hover { color: red; background: yellow; font-weight: bold; } 16 a:visited { color: green; background: white; } 17 </style> 18 </head> 19 <body> 20 <p><a href="002.html">This text should be green <strong>when you 21 hover over it</strong>.</a> (If it starts red, click the link to 22 make sure the link is marked visited.)</p> 23 </body> 24 </html>