Should I use the title attribute if my element has `<figcaption>`?
I have a 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> Do I need to specify a title attribute in addition to the figcaption element and will this lead to SEO problems?
The Title attribute is primarily intended to provide a tooltip about what kind of image or link it is. This is usually the title of the goal.
In images, using figcaption should be sufficient to overcome the title attribute, so you have some markup to describe the resource. As always, the ALT attribute should be considered, even with figcaption.
This is because you can have more than one image on a figure.
For example, using 3 images to illustrate the progress of the 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> Figcaption is enough. But you may need to specify a title if you need to apply microformats such as vCard: http://www.rachaelmoore.name/web-design/microformats/marking-up-contact-information-semantic-using-html5-microformat/