Home »

How can I have two sets of links with different colors?

Question ListCategory: HTMLHow can I have two sets of links with different colors?
adamemliy16 author asked 8 years ago
1 Answers
jully882 author answered 8 years ago

You can recommend this presentation in a style sheet. First, specify colours for general links,
like this:
a:link {color: pink; background: white}
a:visited {color: yellow; background: white}
a:active {color: blue; background: white}
Next, determine the links that you simply wish to possess totally different colours. You’ll use the
category attribute in your hypertext markup language, like this:
<a class=”sample1″ href=”[URL]”>[link text]</a> 
Then, in your style sheet, do like this:
a.sample1:link {color: pink; background: white}
a.sample1:visited {color: yellow; background: white}
a.sample1:active {color: blue; background: white}

Please login or Register to Submit Answer