<script>
a:visited { background-color: white; color: purple; font-style: underline; } # 0,0,1,1
a:hover { background-color: #97fc00; color: blue; font-style: underline; } # 0,0,1,1
a:active { background-color: red; color: blue; font-style: underline; } # 0,0,1,1
a:link { background-color: white; color: blue; font-style: underline; } # 0,0,1,1
</script>
<h3>Pseudo selectors - all relating to links</h3> <p>here the :link selector wins all ties. It doesn't win after a link has been <i>selected</i>, because the link no longer satisfies the rule.</p> <ul> <li><a id="#5">Target #5</a><a href="#1">Link One</a></li> <li><a id="#1">Target #1</a><a href="#2">Link Two</a></li> <li><a id="#2">Target #2</a><a href="#3">Link Three</a></li> <li><a id="#3">Target #3</a><a href="#4">Link Four</a></li> <li><a id="#4">Target #4</a><a href="sel1-5.html">Link Five - next page</a></li> </ul>
here the :link selector wins all ties. It doesn't win after a link has been selected, because the link no longer satisfies the rule.