Proper Use of the Anchor Tag for SEO

...

Recently I was asked how to best use hyperlinks to maximize SEO benefit to both the target and linking pages.

First let me start with a refresher course on the HTML anchor element.

The anchor (or “hyperlink”) element is used to provide a link from one html source to another. This source can be link to a location elsewhere on the page, to another page, or even a call to a javascript function.

The anchor element wraps some content with an opening and closing tag, like so: <a>text to link</a>

There are several commonly used attributes that can be assigned to the anchor tag, including, but not limited to:

  • href: the destination where the text is linked; this should be the shortest possible link to the page/location
  • target: the browser frame where the link will be opened
    • target=“_blank” for a new window or tab
    • target=“_self” to open in the same window (“_self” is the default behavior)
  • title: the “alternate” text for the link; used when the text of the hyperlink is not the same as the linked page.
    • title=“Asynchronous Google Analytics Script”

    There are many other attributes that the anchor element can use, such as rel, rev, class, id, style, hreflang, DOM events (onClick,onBlur, onFocus, etc.) , and others.

    When you are linking, the strongest link-to-page relationship is when the text of the anchor is the same as the text of the linked page.

    That may not not always be contextually correct (it doesn’t always make sense when reading the paragraph in which the link is placed). In that case, the title attribute should be supplied with its value set to the title of the page to which you’re linking.

    Clear as mud?

    Leave a Reply