Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is this visited <a> anchor always purple?

Tags:

html

css

My HTML:

<!DOCTYPE html>
<html>
    <head>
        <style type="text/css">
            /* Make all anchors and variations plain black text color */
            a,
            a:link,
            a:hover,
            a:focus,
            a:active,
            a:selected,
            a:visited
            {
                color:#000000;
            }
        </style>
    </head>
    <body>
        <a href="#">This is a visited link that is puple</a>
    </body>
</html>

When I visit this page, and click on the link, the text color is purple like the default color of a visited link. How can this be? How can I make the <a> text black in all circumstances?

This reproduces in Chrome and IE9; haven't bothered to test anything else yet.

like image 669
tenfour Avatar asked Aug 26 '12 14:08

tenfour


1 Answers

Remove a:selected from your css definition. That fixed it for me. Never heard of :selected. Is it documented anywhere?

like image 82
Jens Avatar answered Sep 27 '22 18:09

Jens