Text Links Ads : Marketing Tips Store : Search Engine Optimization Strategies
WebPosition Gold Pro : Domain Registration Bank : Optilink Software : GoDefy
Mike's Marketing Tools : Mike's Ecommerce Software : Text Links Guide
 
Web HTML-HTML.com
You are here: HTML Codes > Fonts > Font Color

Setting the Color of Links

When setting the color of fonts special attention should be paid to links. Browsers render links in different colors than the rest of the text. If you set the background color of the page you not only need to set the color of the regular text but of the links as well.

To set the color of links we use threepseudo-classes of <A ...>: link for when the link has not been visited, visited for when the link has been visited, and active for when the user is clicking on the link. So, for example, the following code (in a STYLE tag or in a style sheet file) creates a class called darkblue which has a dark blue background and white letters. It also sets the styles of anchors within darkblue when they are regular links (white), visited links (yellow), and when the user is clicking on the links (fuchsia):

.darkblue
 {
 background-color:#000080;
 color:white;
 }
.darkblue A:link{color:white}
.darkblue A:visited{color:yellow}
.darkblue A:active{color:fuchsia}

When we apply darkblue to a <DIV ...> element:

<DIV CLASS="darkblue">
Take a look at our <A HREF="./">home page</A>
</DIV>

we get this:

Take a look at our home page

Font Style >>>

Copyright © 2002-8 Art Dacor USA LLC. All Rights Reserved.
3727 West Magnolia Blvd #489, Burbank, CA, 91505, USA.
www.HTML-HTML.com