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
How do I keep up with the latest HTML enhancements?
How do I make webpages load faster?
How can I display special characters using HTML?
How do I remove the underline from links?
How do I control image placement?
Do all HTML tags need a closing tag?
What screen resolution should I build my webpage for?
How can I make my pages load faster?
How do I place comments within my HTML code?
Should I use an image as a webpage background?
How do I check browser compatibility?
How do I keep the background from moving when scrolling?
Can I make an email link with the subject line already filled in?
How do I prevent browser cache on my pages?
How do I convert Hex values to RGB values?
How do I make a mouse over description for a text link?
How do I know if my HTML code is valid HTML?
How do I make a link open in a new window?
How do I make a javascript text link to the previous page?
How can I write a list without bullets or numbers?
How do I know how others will view my webpage?
How do I create a close window link with javascript?
How important is it to have a consistent looking website?
How do I make a mouse over text description for an image?
How do I increase my website´s appeal to users?
How do I change the color of only one link?
How do I create a "foward" link?
Can I add a background color to text?
How can I automatically redirect to a different page?
Why won´t part of my page display?
How do I format a paragraph in HTML?
How do I use a horizontal rule?
How do I make text look like it´s from a typewriter?
How do I add an image to my webpage?
How do I use superscript in HTML?
How do I place a web page element centered?
What can I learn in the HTML tag definitions category?
How do I use strikethrough style?
How do I use subscript in HTML?
How do I underline text with HTML?
What are some of the new tags and functions in HTML 5?