The titleglobal attribute holds advisory text about the element. Browsers often show it as a tooltip on hover. Per MDN, a strong use case is labeling <iframe> content for assistive technology.
Not deprecated and not experimental. A standard global attribute across modern browsers since about July 2015.
Accessibility warning.
Per MDN: tooltips from title are unreliable for touch, keyboard-only, and many assistive-tech users. Do not put essential information only in title. Prefer visible text and a real <label> for controls.
Syntax
HTML Syntax
syntax.html
<element title="text">
text is advisory information. Equivalent JS: el.title = "Hint".
No title on a child → may inherit from an ancestor.
title="" means ancestor titles are irrelevant for that element.
Useful when a parent tip must not apply to one nested control.
Still advisory only — never the only place critical text lives.
Edge Cases & Pitfalls
Most problems come from treating title tooltips as accessible labels or essential instructions.
a11y
Not for essential content
Touch and keyboard users often never see the tooltip. Keep important text visible on the page.
forms
Do not replace <label>
MDN: using title as the only label for an input is not good practice.
vs element
Attribute ≠ <title> element
The head element sets the document name. The attribute is advisory text on any element.
images
Prefer alt for images
Meaningful image text belongs in alt, not only in title.
stylesheets
Alternate stylesheets
On <link rel="stylesheet">, a non-empty title can mark an alternate style sheet (specialized use).
Compatibility
Browser Support
title is an HTML global attribute in the browser. It is not a Node.js, Deno, or Bun API.
✓ Widely available
title
Supported in all modern browsers. Tooltip UX and AT exposure vary — do not rely on it alone.
97%Global support (approx.)
Google ChromeAll modern
Full support
Mozilla FirefoxAll modern
Full support
Apple SafariAll modern
Full support
Microsoft EdgeAll modern
Full support
OperaAll modern
Full support
Samsung InternetModern
Full support
Internet ExplorerAll
Supported
titleWidely supported
Bottom line: Safe as advisory text and iframe names. Keep essential information visible without depending on hover tooltips.
Remember
Key Takeaways
Role: advisory text (often a hover tooltip).
Best use: name <iframe> content for assistive tech.
Not a label for inputs — use <label>.
≠ the document <title> element.
One line:title is advisory — great for iframe names; never the only place for essential text.
Frequently Asked Questions
It holds advisory text for the element — often shown as a browser tooltip on hover. MDN highlights labeling iframes for assistive technology as a primary good use.
No. The title attribute is a global attribute on any element. The title element in the document head sets the page name in the browser tab and search results.
No. MDN: that is not good practice. Use a visible label element instead. Title tooltips are unreliable for keyboard, touch, and many assistive tech users.
Yes. If an element has no title, it may inherit from an ancestor. An empty title="" means ancestor titles should not apply to that element’s tooltip.
Yes. A line feed (LF) in the attribute value can create a multiline tooltip in supporting browsers.
No. It is a standard global attribute. The caution is accessibility: do not put essential information only in title.