title – element tooltip (attribute)
<element title="additional text">
Additional information about an element that the browser shows as a tooltip after the mouse hovers for a while. On touch devices and from the keyboard the tooltip does not appear, so it must not carry anything important. It makes sense mainly on abbr (the expansion of an abbreviation), iframe (a description of the embedded page) and link (the name of alternative styles).
Values
- Any text. A line break in the value is shown as a new line in the tooltip.
- It is inherited: an element without
titleshows the tooltip of the nearest ancestor withtitle.
- Applies to: all elements (in the head,
titleis a different element – the page title) - In JavaScript:
element.title
Examples
An abbreviation and an embedded map:
<p>The price includes <abbr title="value added tax">VAT</abbr>.</p> <iframe src="https://www.example.com/map" title="Map – 12 Mill Lane, Springfield" width="400" height="300"></iframe>
Accessibility
Screen readers read title inconsistently: for a field without a label they use it as the name, elsewhere as a description or not at all. The label of a field belongs in label, the name of an icon in aria-label or hidden text. A title with the same text as the link adds nothing and screen readers read it twice.
Things to watch out for
- The tooltip appears only after about a second and cannot be styled. For custom help,
popoveror visible text is better. - The
titleattribute and thetitleelement are two different things.
Browser support
Baseline – widely available: works in all major browsers and has for a long time (since 2015 at the latest). Since version: Chrome 1, Firefox 1, Safari 4. As of October 2026 (MDN browser-compat-data).
Related:
abbr – abbreviation
iframe – embedded page
title – page title
label – field label
aria-* – accessibility attributes