HTML <abbr> tag

The <abbr> tag is used to specify text as an abbreviation.

NOTE: The <abbr> tag is not supported in Internet Explorer 6 and earlier versions of Internet Explorer.

Attributes

Attribute Description
title Text that will appear in a tooltip next to the abbreviation when you move the mouse over it. You can set this to equal the full text of the abbreviation.

Standard attributes

class, dir, id, lang, style, title, xml:lang

For more information on standard attributes, check out our HTML standard attributes reference page.

Event attributes

onclick, ondblclick, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onkeydown, onkeypress, onkeyup

For more information on event attributes, check out our HTML event attributes reference page.

Example

Do you want to learn how to code? Take an <abbr title="Introduction">Intro.</abbr>. to Computer Programming class.
Output:
Do you want to learn how to code? Take an Intro. to Computer Programming class.

Move your mouse over "Intro." to see the full text of the abbreviation.

Tips & notes

Some users don't know that they can mouse over an abbreviation to find out what it is an abbreviation of. It can be useful to specify this on your webpages whenever you use abbreviations.

Web Reference
  1. CSS reference
  2. RSS reference
  3. HTML reference


© Copyright 2011-2012 Landofcode.com
Terms of use | Privacy policy | Copyright information | Make a donation