The title attribute adds optional advisory text to an HTML element. Browsers may show its value as a tooltip when the pointer hovers over the element. section 6.1 section 16.1
Use title when a short hover hint adds useful context:
- Add it to an image to describe the logo or other hover text. section 6.1
- Add it to an abbreviation to provide the full term or acronym expansion. section 16.1
A title on an image and an abbreviation
<img src="/images/atomic-logo.png" alt="Atomic Web Design logo" title="Logo for Atomic Web Design"> <abbr title="fear of missing out">FOMO</abbr> Hover over either item to see the browser’s tooltip. section 6.1 section 16.1
