That color is the s...">

HTML default link color

I want to set the color of some elements to the default color of links using CSS.

<a href="/">That color</a> is the same as <span style="color: link;">that</span>.

How to do it? This website does not change the color of the default browser links.

+5
source share
3 answers

Even if you do not change the default color, it would be nice to specify a color so that it looks the same in all browsers. I would put something like this in the stylesheet:

a, span.link {
  color: blue;
}

a:visited, span.visited {
   color: purple;
}

a:active, span.active {
   color: red;
}

Then you can style spanas links<span class="link">Your fake link</span>

+10
source

css css/javascript, , - , , Machine Machine, ( , )

+1

If you want to set a new link color or prevent the color of a specific link from changing after visiting it, add inside the tag <a>:

<A STYLE="text-decoration:none; color=[select your favorite...]" HREF="link.html">test link</A>
0
source

All Articles