HTML <abbr> Tag for Acronyms & Abbreviations


ATTENTION: THIS PAGE IS Valid HTML 5 AND IS BEST VIEWED WITH HTML 5 - Please upgrade your browser or download one of the HTML 5 compatible browsers such as Mozilla Firefox, Chrome, Opera or IE 9 (March 14, 2011 or later). For more information see HTML 5 browsers.

If you find this helpful, please click the Google +1 Button to the left, if it is white, to make it turn blue or red. Thank you! (It also helps find this page again more easily.)

PDF mobile

The <abbr> Tag in HTML 5

The <abbr> tag is used for both abbreviations and acronyms. The abbr element is one of the phrase elements in HTML.

Any HTML code using the <acronym> tag should be changed to use the <abbr> tag instead because the <acronym> tag is deprecated and no longer a valid HTML element in the HTML 5 specification.

<abbr> Tag Syntax

Rules for coding HTML abbr elements
   ... phrasing content expected ...<abbr title="meaning">... phrasing content ...</abbr>...

Make sure you understand the difference between a tag and element and are familiar with the definitions of namespace and other HTML terms.

  1. Code the abbr element for an acronym or abbreviation where phrasing content is expected.
  2. Begin the abbr element with a starting <abbr> tag. The element name uses lower case letters and should be in the HTML namespace, which it will pick up automatically from the xmlns attribute on the <html> tag.
  3. Include a title attribute on the <abbr> tag with the expanded meaning of the acronym.
  4. Include the acronym or abbreviation as the content within the tags.
  5. End the abbr element with a matching </abbr> closing tag.
  6. If the abbreviation stands for a term that is being defined in the same paragraph, wrap a <dfn> tag around the abbr element. If the abbreviation itself is being defined, rather than what it stands for, include a title attribute on the <dfn> tag with the same abbreviation to override the title attribute inherited from the <abbr> tag. See the examples of the <dfn> tag.
Content Model
Content of the abbr element

The content of the dt element can include HTML comments, text content and only those HTML tags that can be used in phrasing content.

  • The content within the tags may also be a hyperlink that links to the acronym definition and shows the user the meaning of the acronym using a pop-up tool tip:
   <a href=""
      title="Three Letter Acronym">TLA</a>

<abbr> Tag Attributes

Attributes of the <abbr> tag
global attributes In addition to the personal attributes of the <abbr> tag below, any of the common HTML attributes can also be coded.
title The title attribute may be coded with the expanded meaning of the acronym or abbreviation in the content of the <abbr> tag. However, browsers tend to ignore the title attribute of the <abbr> tag. To have the browser pop up tool tips with the meaning of acronyms or abbreviations, wrap the <abbr> tags inside <a> tags with title attributes instead, as described by Acronyms .net. Line breaks in the title attribute are preserved. Therefore, the title should not be split across multiple lines.

<abbr> Tag Examples

Examples of the <abbr> tag in HTML 5
<abbr title="abbreviation">abbr.</abbr>
<abbr title="Three Letter Acronym">TLA</abbr>

Any ampersand, double quote, less than or greater than characters in the title or other attributes need to be escaped using HTML character codes.

<abbr title="Texas A&amp;M University">
   <a href=";M-University"
      style="cursor: help"
      onclick="if(confirm('TAMU stands for Texas A&amp;M University')) return false"
      title="Texas A&amp;M University">TAMU</a>

When the cursor hovers over the acronym, the cursor: help style changes the cursor to a question mark to indicate that more information is available. After a brief pause, the meaning of the acronym is displayed in a pop-up tool tip.

To try it, mouse over this: TAMU

Examples with <dfn>, where an acronym or its meaning is being defined

When an acronym or abbreviation is associated with a definition, it could be either the abbreviated form or its expanded meaning that is being defined. The term being defined is identified by the value of the title attribute of the <dfn> tag.

When an abbreviation is a short form of the actual term being defined, a parent <dfn> tag will also assume the value of the <abbr>'s title attribute, which indicates the term that is being defined is the fully expanded meaning:

<dfn><abbr title="Internet Corporation for Assigned Names and Numbers">ICANN</abbr></dfn>
is the international organization which helps ensure that
Internet domain names are assigned in an orderly manner.

When an acronym's meaning is being clarified by expanding it, then it is the acronym itself that is being defined and the title attribute of the parent <dfn> tag also needs to be coded to indicate it is not the expanded meaning in the <abbr>'s title but the acronym or abbreviation itself that is being defined:

When we use the acronym
<dfn title="RSS"><abbr title="Really Simple Syndication">RSS</abbr></dfn>
it is the abbreviation for <b>Really Simple Syndication</b>, not RDF Site Summary.

There are some good examples of defining acronyms in HTML on the site.

Changes in HTML 5 - <abbr> Tag

What's new in HTML 5
Differences between HTML 5 and earlier versions of HTML

The <abbr> tag should be used instead of the HTML <acronym> tag since the <acronym> tag has been deprecated.

The 2000-2010 Recommendations from the W3C HTML Working Group defined the HTML namespace for the abbr element type name along with the names of all HTML element types. In older (pre-2000) versions of HTML, element type names were not associated with a namespace.

Valid HTML 5