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!