Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Link colours

  1. #1
    New Coder
    Join Date
    Aug 2002
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Link colours

    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.

  • #2
    Senior Coder Mhtml's Avatar
    Join Date
    Jun 2002
    Location
    Sydney, Australia
    Posts
    3,531
    Thanks
    0
    Thanked 1 Time in 1 Post
    <font color="YOUR COLOR"><a href="YOUR LINK">YOUR LINK</a></font>
    Omnis mico antequam dominus Spookster!

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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:

    Code:
    <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>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •