Wednesday, July 18, 2007

Importance of anchor text in links (hyperlinks)

The HTML for a clikable link (hyperlink) is

<a href="target site URL">anchor text</a>:

where anchor text is whatever what you should type in which you want displayed (seen) on the web (if unfamiliar with URL, see What is URL and how to get it). For example, this HTML

<a href="http://foodasmedicine.blogspot.com" target="new">Natural Remedies</a>

will result in the following clickable link as seen below which when clicked open the target site in a new window:

Natural Remedies

I have added the attribute target="new". Some also use target="_blank" but the first one you don't need to press the shift key and is shorter. Please note that both has been deprecated and is on the way out with the XHTML (strict) coming into force. However, both will still been supported by XHTML (transitional) for a long while more.

The anchor text is important to search engines because it tells what the target site is all about and you should use something relevant/descriptive of the site for the target site. Don't ever use

<a href="target site URL">herelt;/a>:

as it tells nothing about the target site, and is useless for telling search engines what that target site is all about.

18 comments:

  1. Peter, don't forget that you also want to include a TITLE attribute with your hyperlink code. This gives the reader some instant additional info about the link he/she is about to click and also gives the search engines even more info to chew on.

    You can also include the TITLE attribute in your image codes in addition to the ALT tag - not a replacement for it.

    ReplyDelete
  2. Hi Rob,

    Thanks for the good suggestion. That can give potential "clickers" what they are in for. I will probably add that and say you reminded me, an probably a link to your site, if you want to suggest a site you want me to link to.

    I did wanted to do that, but the title was regarding anchor text. I did this post because some kind soul was linking to my site/post but putting "here" as the anchor text. Maybe I will start a new more comprehensive post regarding links.

    Peter (Blog*Star 2006 and 2007)
    Generating Revenue from your Website

    ReplyDelete
  3. You're welcome, Peter! Adding the extra TITLE code is a bit of extra work, but it becomes second nature once you've gotten into the habit.

    I've verified it to work on IE & Firefox and I believe other browsers support it just the same. You can lots of examples of how this looks over on our 2Dolphins website.

    ReplyDelete
  4. Hi Rob,

    I have been using the alt attribute for images, and I suppose I can even use title attribute for that too, but haven't been doing it. Using title attribute definitely add functionality to the hyperlink as potential "clickers" can get more inforamtion via "tool tip" and have more thing available before deciding whether to click on the link. I think I will definitely post about it, but in another post. Not sure if I will then have to put the display HTML within a scroll box or the longer code will be broken into 2 lines.

    Peter (Blog*Star 2006 and 2007)
    Earning Online

    ReplyDelete
  5. HERE's good tips For Bloger Again Thanks Peter.

    Best Regards
    Dzibeads

    ReplyDelete
  6. Hi Peter ,
    when i try to put Signature as your using "anchor text in Links" in this comments box i can't post it why? message show

    Your HTML cannot be accepted: Attribute "TARGET" is not allowed: ..........etc...

    Thanks In Advance

    ReplyDelete
  7. Peter , Is it possible to use css in a blog post ? Suppose I want to make a post with border, how do i do ?

    ReplyDelete
  8. Hi Henry,

    It is possible to use what they call Inline stylesheet (inside an HTML element). You can try something like

    <spanborder style="border: medium double rgb(250,0,255);> ..... </span>

    I don't know if the above will end up as a long unbroken line. If it does, I will have to delete this comment.

    Peter (Blog*Star)
    Testing Blogger Beta (now New Blogger)

    ReplyDelete
  9. Peter, remember on images, the ALT tag is a textual representation of the image that will be displayed if the image doesn't load or if the reader is using a browser app that doesn't support images (or has images disabled). This may be most common with mobile platforms, but would into play most with accessible browser apps.

    So, an image's TITLE tag plays a different role and optimally would have different content than the ALT tag.

    I dunno exactly how much it helps, but I view these as opportunities to give the search engines a little more to chew on.

    ReplyDelete
  10. Hi Rob,

    Thanks for further clarification. I know search engine read alt="" attribute and suspect they read title="" too, but haven't come across any reference to it except yours. If you have sources to refer to, will appreciate if you provide the URL of the links. Save me the trouble of hunting for it.

    Peter (Blog*Star 2006 and 2007)
    Dummies Guide to Google Blogger
    "online book" in progress

    ReplyDelete
  11. Hi DZI Beads,

    Sorry for this late response to you question:
    -----------------------
    Hi Peter ,
    when i try to put Signature as your using "anchor text in Links" in this comments box i can't post it why? message show

    Your HTML cannot be accepted: Attribute "TARGET" is not allowed: ..........etc...

    Thanks In Advance
    ----------------------------
    target="_blank" or target="new" is not allowed in comments.

    Peter (Blog*Star 2006 and 2007)
    Testing Blogger Beta (now New Blogger)

    ReplyDelete
  12. thanks a lot, this site has been very helpful to me, i will be back to lear more, cheers^^

    ReplyDelete
  13. Thanks Peter Re the Anchor Link I should have known better as I use Anchor links on my website sometimes I use Image links as well.

    ReplyDelete
  14. Hi Whizzed,

    Thanks for the thanks. Only thing is, I don't get scolded for teaching "grandpa to suck eggs" or something like that. Me no speak English.

    Peter Blog*Star
    Testing Blogger Beta (now New Blogger)

    ReplyDelete
  15. Thank you very much for the "comments" on NanoGeekTech
    I have tons of Questions

    I have tried to add a third column but I have had issues I will keeping on trying. I only Tried once but the spacing on Layout "page element" was wrong it was Minima 3 columns from Blogcrowd I will try again or try one of the many options you have provided.

    -How can I block certain Ads on my site. For example if I have on Article about HIV's cellular partners For the next two to maybe four days I have HIV ads which I do not mind but I would like a little variety like when I have other topics such as Blu-ray I will get a variety of ads pertaining to key words in my body. I have been fiddling with my Ad channels will that help sorry for being so long winded. But that Ad thing bothers me a little.

    I currently have 4 active ads on Adsense. When I place a New Ad sometimes it would not appear or it may appear and the previous Ad will disappear? I will contuine to read one of best Blog Resource on the Web

    Update: I think I have fixed the Ad issue I just checked. I will keep in touch My Blog is still a work in progress. I am trying to make reading about Science Tech and Gaming fun.

    Again thank you very much
    NanoGeek

    ReplyDelete
  16. Hi NanoTech,

    You are allowed only max 3 ad units on one page. Anything more and they are suppressed by AdSense.

    Are you trying to add a third column to an existing template or are you having difficulties with changing the template?

    Sorry about responding so late, but reasons given at Why your comments and emails are not getting prompt response: Apologies.

    Peter Blog*Star
    Blogger Dough
    (Blogging helped my put 2 sons through college on my pension and if not for blogging, I would have been in financial difficulties. We want to help you do the same)

    ReplyDelete
  17. Peter,

    I've been wondering how to do this for quite some time. Thanks so much for the info. It was extremely helpful.

    Blessings,
    Sandy
    www.godpseakstoday.blogspot.com

    ReplyDelete
  18. Came across this blog while surfing just for "anything" I am maintaining a veb site www.pakone.pk and have to make efforts to not only force the links to open in new window but also open in a manner the visitor is unable to copy the page and if he is able to copy then with out re-typing he cannot use the contant. I wish if the peter has the time to have a look at www.pakone.pk which may turnout to be great help for me

    ReplyDelete

Find help, info, instructions, tips, tricks

Tip: Use search box below or this box, labels in the first right sidebar, archive, ctrl+F for this page or sitemap to find topics