...

View Full Version : Link colours



Jason.K
09-27-2002, 07:29 AM
I was wondering how do you change invidual link colours so I could have one links say black and another link white on the same page using HTML not CSS.

Mhtml
09-27-2002, 11:10 AM
<font color="YOUR COLOR"><a href="YOUR LINK">YOUR LINK</a></font>

Roy Sinclair
09-27-2002, 05:15 PM
Originally posted by Mhtml
<font color="YOUR COLOR"><a href="YOUR LINK">YOUR LINK</a></font>

Gag! Used the font tag!

It's wrong too, you have to put the font tag inside the anchor tag to override the anchor color using the obsolete font tag.

Here's the "modern" way to handle this:



<html>
<head>
...
<style type="text/css">
a.isWhite { color: #ffffff; }
a.isBlack { color: black; }
</style>
...
</head>
<body>
...
<a href="whitelink.htm" class="isWhite">White Link</a>
<a href="blacklink.htm" class="isBlack">Black Link</a>
<a href="otherwhitelink.htm" class="isWhite">Another White Link</a>
...
</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum