HTML Tags
HTML <abbr> Tag
The <abbr> tag marks up an abbreviation or acronym, and its title attribute supplies the full expansion. It is the modern replacement for the obsolete <acronym> tag.
The <abbr> Tag
The <abbr> element represents an abbreviation or acronym. When you add a title attribute, browsers usually show the full description as a tooltip on hover, and assistive technologies can announce it.
It is an inline element. Many browsers render it with a subtle dotted underline to indicate that more information is available.
Syntax
<abbr title="Full description">ABBR</abbr>Example
<!DOCTYPE html>
<html>
<body>
<p>
The <abbr title="World Health Organization">WHO</abbr> was founded in 1948.
</p>
<p>Hover over WHO to see its full name.</p>
</body>
</html>More Examples
<!DOCTYPE html>
<html>
<body>
<p>
We use <abbr title="HyperText Markup Language">HTML</abbr> and
<abbr title="Cascading Style Sheets">CSS</abbr> to build web pages.
</p>
</body>
</html>Attributes
| Attribute | Description |
|---|---|
| title | The full expansion of the abbreviation, shown as a tooltip and read by screen readers. |
Provide the title attribute on at least the first use of an abbreviation. It improves accessibility and clarity for readers who do not know the term.
Key Takeaways
- <abbr> marks abbreviations and acronyms.
- The title attribute supplies the full expansion.
- It replaces the obsolete <acronym> element.
- It is inline and often shown with a dotted underline.
- Adding title improves accessibility and SEO clarity.
