views:

30

answers:

2

I have a piece of code like this:

<figure>
    <img title="An amazing image that I forgot to specify a url for"/>
    <figcaption>An amazing image that I forgot to specify a url for</figcaption>
</figure>

Is it necessary for me to specify the title attribute in addition to the figcaption element, and will not doing so result in SEO problems?

A: 

Figcaption is enough. But you may need to specify title if you have to apply microformats like vCard: http://www.rachaelmoore.name/web-design/microformats/marking-up-contact-information-semantic-using-html5-microformat/

how
+1  A: 

Title attribute is mainly for providing a tooltip about what is that image or link about. Usually a the target's title.

In the images, using figcaption should be enough to overcome title attribute, hence you have a specific markup for describing the resource. Howver consider always using ALT attribute, even with figcaption.

This is because you can have more than one image in a figure.

For example, using 3 images for ilustrating progress on a process.

<figure>
<img src="img1.png" alt="The start of process. Subject is raw." />
<img src="img2.png" alt="Middle process. Subject is changing." />
<img src="img3.png" alt="End of process. Subject is completely transformed." />
<figcaption>Process steps, from left to right: raw subject, changing and changed subject.</figcaption>
</figure>
Dave