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.
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
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
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.
w3schools defines the title attribute as follows:
As for semantic markup it's enough to add the
title
attribute to thea
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 thealt
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: