Skip to content Skip to sidebar Skip to footer

Do I Still Need To Use The Title Attribute If My Element Has A `
`?

I have a piece of code like this:
An amazing image that I forgot t

Solution 1:

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><imgsrc="img1.png"alt="The start of process. Subject is raw." /><imgsrc="img2.png"alt="Middle process. Subject is changing." /><imgsrc="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>

Solution 2:

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/

Post a Comment for "Do I Still Need To Use The Title Attribute If My Element Has A `
`?"