title
title attribute
The title
global attribute provides advisory information about the associated element.
- Usage: The
title
attribute is used for labeling elements such as<iframe>
, data table controls, and<abbr>
for expanding abbreviations. It is also applicable with<link rel="alternate">
for alternate stylesheets.
Syntax
<element title="text">
Example
The three primary web development technologies are HTML, CSS, and JavaScript.
<p>The three primary web development technologies are
<abbr title="Hypertext Markup Language">HTML</abbr>,
<abbr title="Cascading Stylesheets">CSS</abbr>, and
JavaScript.</p>
Accessibility concerns
The title
attribute can present difficulties for:
- Touchscreen device users
- Keyboard navigation users
- People relying on assistive technologies, such as screen readers or magnifiers
- Individuals with limited fine motor skills
- Users with cognitive impairments
See also
- All global attributes
- The
HTMLElement.title
property corresponds to this attribute.
Conclusion
The title
attribute provides supplementary information about an element, often shown as a tooltip. However, it can pose challenges for certain users, including those with disabilities or using assistive technologies. Developers should be mindful of its limitations for accessibility.
target
The target attribute in HTML specifies where the linked content or form submission will be displayed, such as in the current window, a new tab, or a designated frame.
translate
The translate attribute in HTML determines if the content of an element should be translated when the page is viewed in different languages. It accepts values of "yes" or "no."