/* Make all anchors and variatio...">

Why is this visitor <a> anchor always purple?

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 the visited link. How can it be? How can I make the text <a>black under any circumstances?

This is playable in Chrome and IE9; didn't bother checking anything else.

+5
source share
3 answers

Remove a:selectedcss from your definition. This fixed it for me. Never heard of :selected. Is it documented somewhere?

+9
source

Because it a:selecteddoes not exist. Remove it!

+5
source

a: , . , .

: a: , . , : , .

Fiddler

0

All Articles