Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom Color with Same Page Hyperlink? 1

Status
Not open for further replies.

bsquared18

Technical User
Jun 10, 2001
329
US
Am I correct that in basic HTML, when you want a hyperlink to something on the same page using code like <A HREF="#portrait">, that (to paraphrase Henry Ford) you can have any color you want, as long as it's purple?

I searched the web and tried every way I could think of to customize the color of this link without success. Any help will be greatly appreciated!

Thanks,

Bill
 
Thanks! I thought I had tried that but must have done it wrong. Using the code from your link, it works fine.

Bill
 
In today's world you should really embrace the css and do it there. This goes in the head of the document, or even better, a separate stylesheet:
Code:
<style type="text/css">
a:link { color: red; }
a:visited { color: #77ab3f; }
a:hover { color: black; }
a:active { color: #a3b298; }
</style>
This is just an example. You can even skip the other states, if you want to just change the color of the default link.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top