alt attribute for regular links

Discussion in 'HTML & Website Design' started by hugodiaz, Dec 15, 2007.

  1. #1
    I usually use alt attributes for regular hyperlinks, but on my forum when I use alt="" with regular links I get invalid errors or whatever with this: http://validator.w3.org/

    So for example if I used
    <a href="mywebsite" alt="some text" title="some other text">Link</a>
    Code (markup):
    I will get some error message about the alt part, specifically:
    Can anyone help me with this? I heard that alt text was useful for SEO, but maybe that's only for images? ???
     
    hugodiaz, Dec 15, 2007 IP
  2. babyboy808

    babyboy808 Well-Known Member

    Messages:
    491
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    125
    #2
    The alt attribute is only used for images, not links. Use titles for links
     
    babyboy808, Dec 15, 2007 IP
    hugodiaz likes this.
  3. hugodiaz

    hugodiaz Well-Known Member

    Messages:
    971
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    120
    #3
    Thanks. So will the titles help with SEO?
     
    hugodiaz, Dec 15, 2007 IP
  4. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It generally doesn't matter for SEO, but its great for humans. Well, most of the time.
    Esp if the link's own text isn't really clear, the title can say something like, "Click here to visit so-and-so's site".
     
    Stomme poes, Dec 15, 2007 IP
  5. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #5
    IMO, "good" titles help with SEO.
    Try not to use a long title fulfilled with keywords, take care that people see that title as a tooltip when the mouse stop over link for a few seconds.
     
    ajsa52, Dec 15, 2007 IP
  6. hugodiaz

    hugodiaz Well-Known Member

    Messages:
    971
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    120
    #6
    Yeah, I used to use alt="keywords..." and then just a blank or a short description with the titles because I knew that members could see it.

    Anyway, thanks for your help. :)
     
    hugodiaz, Dec 15, 2007 IP
  7. yangyang

    yangyang Banned

    Messages:
    757
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #7
    By the goodness of SEO, title for links are generally not so much a candy as alt for images.

    Don't let go of any opportunity that you can use a alt with img, but title just helps accessibility.
     
    yangyang, Dec 15, 2007 IP