Change color of URL

Discussion in 'HTML & Website Design' started by terminator69, Dec 30, 2007.

  1. #1
    How do i change color of url?
     
    terminator69, Dec 30, 2007 IP
  2. manishk

    manishk Peon

    Messages:
    63
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can use CSS to do this:

    
    a{color:blue}
    a:visited{color:pink}
    a:hover{color:yellow}
    
    Code (markup):
     
    manishk, Dec 30, 2007 IP
  3. terminator69

    terminator69 Notable Member

    Messages:
    4,872
    Likes Received:
    260
    Best Answers:
    0
    Trophy Points:
    230
    #3
    How do i add that to text?

    <font color="#0D0080"><u><a href="URL">TEXT</u></font>
    Code (markup):
     
    terminator69, Dec 30, 2007 IP
  4. terminator69

    terminator69 Notable Member

    Messages:
    4,872
    Likes Received:
    260
    Best Answers:
    0
    Trophy Points:
    230
    #4
    Anyone know? I'm not sure what to do with the CSS code.
     
    terminator69, Dec 30, 2007 IP
  5. twistedspikes

    twistedspikes Notable Member

    Messages:
    5,694
    Likes Received:
    293
    Best Answers:
    0
    Trophy Points:
    280
    #5
    You can either just swap that round to look like this:

    <a href="URL"><font color="#0D0080"><u>TEXT</u></font></a>
    Code (markup):
    Note that this is bad practice now, and isn't valid.

    Or you can use css (the valid way to do it).

    <a href="URL" style="color:#0D0080; text-decoration:underline;">TEXT</a>
    Code (markup):
    Or if your wanting to change it so it has a hover colour different than the normal colour then you can do it this way:

    Placing this in the head section of you page:

    <style>
    a{color:#000000;}
    a:visited{color:#FFFFFF;}
    a:hover{color:#FF0000;}
    </style>
    Code (markup):
    Then placing this in your body:

    <a href="URL">TEXT</a>
    Code (markup):
    Although do note that this will make all the links on a page the same, if you want it just to affect one or a group of them just reply and I will explain that too :)

    Hope that helps :D
     
    twistedspikes, Dec 30, 2007 IP
  6. terminator69

    terminator69 Notable Member

    Messages:
    4,872
    Likes Received:
    260
    Best Answers:
    0
    Trophy Points:
    230
    #6
    That worked, thanks a bunch. :)
     
    terminator69, Dec 30, 2007 IP
  7. twistedspikes

    twistedspikes Notable Member

    Messages:
    5,694
    Likes Received:
    293
    Best Answers:
    0
    Trophy Points:
    280
    #7
    No problem mate :D
     
    twistedspikes, Dec 30, 2007 IP
  8. free

    free Banned

    Messages:
    1,154
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #8
    free, Jan 1, 2008 IP