Title attribute (SEO)

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen

In HTML, title is one of the attributes that is available for images (and maybe other objects as well). I used to call them tooltips, but that's the wrong term.

Alt texts are more important

See Alt texts (SEO)#Alt texts vs. titles - Which is more important? for details.

Alt text & Title in action

Put an arbitrary image on your computer desktop, call it tmp.png and create file test.html (also on the desktop) with the following content:

   alt="This is the alt text"
   title="This is the title"

Doubleclick on the file to open it in your browser. Some things you might notice:

  • The alt text doesn't pop up
  • The title does pop up.


The title attribute is usually shown as tooltip when you hoover over it with a mouse or similar device - But they are not 'tooltips', that's only how they appear.



The title attribute is shown as a tooltip when you hover over the element.
A title attribute is not required. What’s more, most of the time it doesn’t
even make sense to add it. They are only available to people who use a mouse
(or other pointing devices) and the only one case where the title attribute is
required for accessibility is on <iframe> and <frame> tags.

If the information conveyed by the title attribute is relevant, consider making
it available somewhere else, in plain text. And if it’s not relevant, consider
removing the title attribute entirely.

Conclusion: Use alt texts, don't use title.

See also