Anonymous the Great
Anonymous the Great

Reputation: 1669

How do I make an HTML link that doesn't highlight?

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

Upvotes: 6

Views: 37681

Answers (5)

Adam
Adam

Reputation: 44929

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:

Upvotes: 12

Jack Marchetti
Jack Marchetti

Reputation: 15754

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

a {
   text-decoration: none;
} 

Upvotes: 7

orandov
orandov

Reputation: 3276

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

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

Upvotes: 1

alejandrobog
alejandrobog

Reputation: 2101

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

body a
{
  color: #000000;
}

Upvotes: 1

Ben Everard
Ben Everard

Reputation: 13804

Try this :-)

a:visited {
    color: black;
}

Upvotes: 3

Related Questions