Question

When it comes to linked images and SEO, should the title attribute be used on the <img> tag, the parent <a> tag or both?

Common practice seems to be to add the title attribute to the <a> tag. But is this best for SEO? Would there be any harm in adding it to both tags? If not, is there harm in the title text being identical on both?

P.S. I am aware that you should almost always use the alt attribute on <img> tags regardless of the title attribute.

Was it helpful?

Solution

w3schools defines the title attribute as follows:

The title attribute specifies extra information about an element. The information is most often shown as a tooltip text when the mouse moves over the element.

As for semantic markup it's enough to add the title attribute to the a tag. Adding it to the image within isn't necessary, except you want to have different content for the title attribute to describe directly the image.

As far as SEO is concerned: if the img tag already has the alt attribute, you don't need the title attribute.

A Usefull blogentry about that:
http://www.wpromote.com/blog/seo/image-alt-vs-title-using-alt-title-attributes-in-image-tags/

Excerpt:

While the ALT attribute provides alternative text when images cannot be displayed, the TITLE text offers supplementary information about the element in which it is contained. According to this post on the Google Webmaster Blog, Google tends to focus on the information in the ALT text. So there you have it! If you’re only going to use one attribute… ALT it is!

OTHER TIPS

That's a good question. The title attribute isn't used by Google and Bing (in search engine ranking algorithm). Titles attributes are useful for accessibility (blind people and vocal navigation for example).

Nevertheless, the useful (very useful in SEO strategy) is the "alt" attribute. This one is used by Google and other search engines. "alt" has to be used on img balise.

In the <alt> attribute you describe, what you can see on the image.

In the <title> attribute of the image, you describe the general topic, the image is about.

In the <title> attribute of the <a>, you describe the general topic, the <a> is about.

If there is nothing else in your <a> than the image, there is no need to add a <title> attribute to the image (talking about the Google Robot), else it is.

Conclusion: Do never use identical titles, that is absolutely useless for Search Engines, and will

  1. brings your Code Quality in there ranking down
  2. not generate new keywords

EDIT1: I am not agreeing that much, with the other answers, since the title attributeis at least used in the Google Image Crawling and for checking the Code Quality, which can both decrease your CPC (=Cost per Clicks) when using adwords

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top