English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Is it possible to have two different link colors in an HTML page? I want to have the links in my toolbar one color, and a link elsewhere on my page a different color.

Thank you.

2007-02-22 19:14:21 · 5 answers · asked by Anonymous in Computers & Internet Programming & Design

Everyone is giving me great answers, thank you. I'm 13 years old and I don't know how to use CSS. I taught myself HTML this week, so I'm not perfect yet.

2007-02-23 06:38:10 · update #1

5 answers

Im not sure with pure html, but with css it would be easy..

if you want to use css try something like this.

make two link style one like so

a:link {
color: #f00;
background-color: transparent;
}

a:visited {
color: #c00;
background-color: transparent;
}

a:hover {
color: #000;
background-color: #f00;
text-decoration: none;
}

a:active {
color: #f00;
background-color: transparent;
}

and one something like this..
a.special:link {
color: #00f;
background-color: transparent;
}

a.special:visited {
color: #00c;
background-color: transparent;
}

a.special:hover {
color: #fff;
background-color: #00f;
text-decoration: none;
}

a.special:active {
color: #00f;
background-color: transparent;
}

then just add a class atribute to your links

google


hope that helps...

2007-02-22 19:28:40 · answer #1 · answered by jmak2228 2 · 1 0

The easiest way is to use CSS to define those colors
a.toolbar { color: #01FF01 }
and then in your HTML page has to be something like
answer #2 · answered by Anonymous · 0 0

Yes you can do this not only two but you can use separate colors for each link...
1. use CSS class.
2. use style in the link tag () with color.

both are simple and easy ways...

2007-02-23 03:25:17 · answer #3 · answered by Shree J 2 · 0 0

Absolutely! There are different ways of doing it. One way is to define two classes of styles with different colors and apply them to the links respectively.

2007-02-23 03:20:16 · answer #4 · answered by Raymond 3 · 2 0

try using style sheet(css) and apply different classes for different links

2007-02-23 03:32:30 · answer #5 · answered by gansatanswers 3 · 0 0

fedest.com, questions and answers