6

What I mean by that, is having a link without it highlighting purple/blue when you click it/don't click it.

5 Answers 5

12

You need to add some CSS styling using CSS pseudo-classes.

Here is an example showing CSS added to the head element in a style tag that changes all links to always be black. However, ideally CSS should be in an external file and for usability you probably want to give some indication that the text is a link.

<head>
    <style type="text/css">
       a:link {color: black;}      /* unvisited link */
       a:visited {color: black;}   /* visited link */
       a:hover {color: black;}     /* mouse over link */
       a:active {color: black;}    /* selected link */
    </style>
</head>

See:

7

You can use the following css, either in a stylesheet or enclosed in <style> tags:

a {
   text-decoration: none;
} 
3

Try this :-)

a:visited {
    color: black;
}
2
  • Thanks! How do I do that with the unvisited link? I will try "unvisited". ^- That did not work. Jun 24, 2010 at 21:40
  • 1
    No need to specify :visited, this will work fine a { color: black; }
    – Rob
    Jun 24, 2010 at 21:42
1

If you want it for all your website you can set the style of your body, something like this:

body a
{
  color: #000000;
}
1

You have to use the CSS Pseudo Classes to style it.

a, a:visited{
     color:#000;
}

Not the answer you're looking for? Browse other questions tagged or ask your own question.