CodeAve.com CodeAve.com - HTML - Hyperlinks
ASP
JavaScript
CSS
HTML
·Forms
·Hyperlinks
·Headers
·Images
·Tables
·Text Display
·Miscellaneous
·Contents
·What's New?
Maps
Links
Mail List
Search
Sitemap


 


HyperLink Colors
Hyperlinks typically display as blue underlined text. This is because most browsers default settings are set up to display hyperlinks in that manner. There are two basic methods for making a hyperlink color something other than the default browser view. The first method is by declaring the colors for all links in the body tag. The second method is to place font command inside the <a href> </a> tags. Each way has its benefits and drawbacks and specific applications. Both methods are illustrated in the example below.
View the Output
Text View
Print View
Mail this Link
Download the Code

<html>
<title>
CodeAve.com(HyperLink Colors)</title>
<body bgcolor=
"#FFFFFF" vlink="#FF0000" alink="#00FF00" link="#0000FF">

<!-- 
link="#0000FF" sets all previously unclicked hyperlinks to blue
alink="#00FF00" sets all hyperlinks to green as they are clicked
vlink="#FF0000" sets all previously viewed hyperlinks to red -->

Hyperlinks with colors set by body commands

<p>

<a href="http://www.codeave.com">CodeAve.com</a>
<br>
<a href=
"http://www.aspin.com">Aspin.com</a>
<br>
<a href=
"http://www.aspwire.com">ASPWire.com</a>
<br>
<a href=
"http://www.yahoo.com">Yahoo.com</a>
<br>
<a href=
"http://www.go.com">Go.com</a>
<br>
<a href=
"http://www.goto.com">GoTo.com</a>
<br>
<a href=
"http://www.softcomca.com">Softcomca.com</a>

<p>
<!-- Placing font commands within the <a> </a> tags will allow
for any link to have a unique color -->

Hyperlinks with colors set by font commands

<p>

<a href="http://www.codeave.com"><font color="#0000FF">CodeAve.com</font></a>
<br>
<a href=
"http://www.aspin.com"><font color="#000000">Aspin.com</font></a>
<br>
<a href=
"http://www.aspwire.com"><font color="#FF0000">ASPWire.com</font></a>
<br>
<a href=
"http://www.yahoo.com"><font color="#FF00FF">Yahoo.com</font></a>
<br>
<a href=
"http://www.go.com"><font color="#00FF00">Go.com</font></a>
<br>
<a href=
"http://www.goto.com"><font color="#FF0000">GoTo.com</font></a>
<br>
<a href=
"http://www.softcomca.com"><font color="#808080">Softcomca.com</font></a>

</body>
</html>

 

 

 



ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
Maps: Map Script Writers | Bing Maps | Google Maps
Privacy Statement

CodeAve.com is hosted by MyHosting.com
Donate Food Online with a Mouse Click at TheHungerSite.com
Donate Land Online with a Mouse Click at TheRainForestSite.com
© 1999 - 2014 CodeAve.com
All Rights Reserved