HTML: the abbr element
The <abbr> element marks an abbreviation or acronym. Use its title attribute when readers need the full name.
What you will learn
- How to mark an abbreviation or acronym with
<abbr> - How the
titleattribute provides the full name - How to make shortened terms easier to understand
Minimal example
<p><abbr title="HyperText Markup Language">HTML</abbr> is used to structure a web page.</p>
The visible text stays short, while the title value gives the expanded name. Browsers commonly show it as a tooltip when the pointer rests on the abbreviation.
When to use it
- Use
<abbr>when the shortened form itself has meaning in the content. - Provide a useful full name when readers may not know the term.
- Do not use the obsolete
<acronym>element; HTML uses<abbr>for both abbreviations and acronyms.
Common mistakes
- Do not put an unrelated explanation in
title. - Do not assume a tooltip is the only way to provide essential information.
- Introduce an unfamiliar term in visible text when the full name is important for understanding.