A:hover and named anchors

If you hover over or next to the heading "A:hover and named anchors" in Mozilla, Netscape 6+, or Opera 7 you will notice that it is now not subject to the same hover effects as the link below. This is due to the addition of the attribute selector a[name]:hover.

This is a link to the above heading

a {display: block}
a:link, a:visited {text-decoration: none; color: blue}
a:hover {text-decoration: underline; color: red; background: yellow}
a[name]:hover {text-decoration: inherit; color: inherit; background: inherit}

<h1><a name="target">A:hover and named anchors</a></h1>
<-- Back to the example problem page
Test date: June 20, 2002
Modified: June 25, 2002
Modified: March 3, 2003