HTML/Elements/abbr

From Web Education Community Group
< HTML‎ | Elements
Jump to: navigation, search

<abbr>

The <abbr> element represents an abbreviation or acronym.

Point

  • If the title attribute is specified, it must contain an expansion of the abbreviation, and nothing else.
  • Abbreviations for which the author wants to give expansions, where using the abbr element with a title attribute is an alternative to including the expansion inline.
  • Abbreviations that are likely to be unfamiliar to the document's readers, for which authors are encouraged to either mark up the abbreviation using a abbr element with a title attribute or include the expansion inline in the text the first time the abbreviation is used.


HTML Attributes

See global attributes.


Examples

Example A

[try it]

<p>The <abbr title="Hyper Text Markup Language">HTML</abbr>
 is the publishing language of the World Wide Web.</p>

Abbr01.png

Example B

An alternative way to write this would be [try it]:

<p>
The <dfn id="HTML">Hyper Text Markup Language</dfn>
(<abbr title="HyperText Markup Language">HTML</abbr>) is the publishing language of the World Wide Web.
</p>

Abbr02.png

Example C

This paragraph links an abbreviation to its definition [try it]:

<p>
The <dfn id="HTML">Hyper Text Markup Language</dfn>
(<abbr title="HyperText Markup Language">HTML</abbr>) is the publishing language of the World Wide Web.
</p>
<p>The first version of <a href="#HTML"><abbr title="Hyper Text Markup Language">HTML</abbr></a>
 was described by Tim Berners-Lee in late 1991.</p>

Abbr03.png

HTML Reference

The HTML5 specification defines the <abbr> element in 4.6.9 The abbr element.