HTML Reference ยท Inline Text
The <abbr> element
Reference for the HTML <abbr> element: marking abbreviations and acronyms, giving their expansion with title, accessibility notes and technical details.
The <abbr> element marks an abbreviation or acronym, such as "HTML", "km" or "Dr.". When it has a title attribute, the value must be the full expansion and nothing else.
Marking an abbreviation tells browsers, translation tools and styling that this short form stands for something longer. Some browsers show a dotted underline and display the title as a tooltip on hover.
<p>The <abbr title="World Health Organization">WHO</abbr> published new guidance.</p>
Try it
Hover over "GMT" to see its expansion. In the second paragraph the expansion is written out in the text, which is the most reliable way to explain an abbreviation.
Attributes
| Attribute | Values | Description |
|---|---|---|
title |
Text | The full expansion of the abbreviation. On <abbr> this global attribute has this specific meaning. |
The element also accepts the other global attributes.
Usage notes
- Spell it out in the text the first time. Tooltips do not appear on touch screens or for keyboard users, and screen readers often skip
title. Writing "Cascading Style Sheets (CSS)" in the sentence helps everyone. titlemust be the expansion only. Don't use it for other remarks such as "a common web language".- One expansion per abbreviation. If the same short form appears many times, you don't need to repeat
titleeach time; marking the first use is enough. - No
<acronym>. The old<acronym>element is obsolete;<abbr>covers both abbreviations and acronyms. - Definitions are different. If you are defining a term rather than just shortening it, wrap the term in
<dfn>. You can put an<abbr>inside a<dfn>when the term being defined is an abbreviation. - Styling. Browsers usually underline
abbr[title]with a dotted line. You can change that withtext-decoration, but keep some visible hint if the tooltip is the only place the expansion appears.
Technical summary
| Content categories | Flow content, phrasing content, palpable content |
| Permitted content | Phrasing content |
| Tag omission | None; both the start and end tags are required |
| Permitted parents | Any element that accepts phrasing content |
| Implicit ARIA role | No corresponding role |
| DOM interface | HTMLElement |
| Default display | inline |
Browser support
Supported in every browser; the dotted underline for abbr[title] is a default in all current browsers.
Related
<dfn>โ the defining instance of a term<acronym>โ the obsolete predecessor- Global attributes โ including
title - Lesson: Quotations, Citations and Abbreviations