December 29, 2006, Newsletter Issue #97: Changing the color of a single link

Tip of the Week

Controlling the color of links on a web page is easy using the LINK and VLINK attributes of the BODY tag, as follows:
<BODY LINK="RED" VLINK="RED">
<A HREF="http://www.html-tips.com">Red Link</A>
</BODY>


But what if you want several links to have different colors? The logical approach is to use the FONT tag, in this manner:
<FONT COLOR="red"><A HREF="http://www.html-tips.com">Example Link</A></FONT>
<BR>
<FONT COLOR="green"><A HREF="http://www.html-tips.com">Example Link 2</A></FONT>
But here is what it produces:
Example Link

Example Link 2


Now here is the correct way to achieve the desired result:
<A HREF="http://www.html-tips.com"><FONT COLOR="red">Example Link</FONT></A>
<BR>
<A HREF="http://www.html-tips.com"><FONT COLOR="green">Example Link 2</FONT></A>
Which produces:
Example Link

Example Link 2

About LifeTips

Now one of the top on-line publishers in the world, LifeTips offers tips to millions of monthly visitors. Our mission mission is to make your life smarter, better, faster and wiser. Expert writers earn dough for what they know. And exclusive sponsors in each niche topic help us make-it-all happen.

Not finding the advice and tips you need on this Html Tip Site? Request a Tip Now!


Guru Spotlight
William Pirraglia