title (attribute)
The title global attribute contains text representing advisory information related to the element it belongs to.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 1 | 12 | 1 | ≤4 | 18 | ≤3.2 | |
| DOM API | ||||||
| The HTMLElement.title property represents the title of the element: the text usually displayed in a 'tooltip' popup when the mouse is over the node. | 1 | 12 | 1 | 3 | 18 | 1 |
| Other | ||||||
html.global_attributes.title.multi-line_titles Multi-line titles | ≤64 | 12 | ≤58 | ≤11 | ≤64 | ≤11 |
1+Supported (version) Not supported ※Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)
Syntax
HTML
<p title="これはツールチップです">Please hover over</p>
<abbr title="HyperText Markup Language">HTML</abbr> Live demo
Use cases
-
Using title (attribute)
The title global attribute contains text representing advisory information related to the element it belongs to.
Cautions
- May not be supported in older browsers.
Accessibility
- Verify how this element is announced by screen readers.