Remove underline from Hyperlink

Discussion in 'HTML & Website Design' started by Ripped, Aug 30, 2008.

  1. #1
    <a href="somesite.com" style="color: #CCCCCC" style="text-decoration:none"> text </a>

    What's wrong with the statement above? when I try to enter it the code itself shows up on the page:

    <a href="somesite.com" style="color: #CCCCCC"> text </a> - This works well for chaning the color of the hyperlink, however when I try to add style="text-decoration:none" to it to remove the underline, it doesn't work

    What's wrong?
     
    Ripped, Aug 30, 2008 IP
  2. salihpk

    salihpk Banned

    Messages:
    689
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <a href="xyz.com" style="text-decoration:none; color:#FF0000">hi</a>

    Try this it will work.
     
    salihpk, Aug 30, 2008 IP
    Ripped likes this.
  3. Ripped

    Ripped Well-Known Member

    Messages:
    2,151
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    165
    #3
    Thanks man that worked! Repped!
     
    Ripped, Aug 30, 2008 IP
  4. nicangeli

    nicangeli Peon

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If you are going to do that for all of your hyperlinks, then you might as well add the following to the <head> section of your site (or your external stylesheet)


    
    <style type="text/css">
    
    a {
    color: #FF0000;
    text-decoration: none;
    }
    
    </style>
    
    Code (markup):
     
    nicangeli, Aug 30, 2008 IP