HTML5 Reference

HTML <abbr> tag

Definition

The <abbr> tag is used to define an abbreviation or acronym and is used with the title attribute which specifies the phrase or word being abbreviated or acronymised.

Example


<p>Jeff Lynne was a co-founder of <abbr title="Electric Light Orchestra">ELO</abbr>.</p>

Jeff Lynne was a co-founder of ELO.

Attributes

The following attributes can be used with the <abbr> tag.


<abbr> Specific Attributes
Attribute Value Description Example
There are no required or optional attributes specific to the <abbr> tag.
<abbr> Global Attributes
Attribute Description Example
Common
classSpecifies a classname for the element allowing you to apply the style of the predefined class to the content.

<abbr class="name">Abbreviation text here</abbr>
idSpecifies a unique id for the element allowing you to apply the style of the predefined id to the content.

<abbr id="name">Abbreviation text here</abbr>
styleSpecifies an inline style for the element allowing you to apply the style to the contentt.

<abbr style="color:red;">Abbreviation text here</abbr>
titleSpecifies an inline style for the element allowing you to apply the style to the content.

<abbr title="Content info.">Abbreviation text here</abbr>
Keyboard
accesskeySpecifies a keyboard shortcut to associate with the element.

<abbr accesskey="a">Abbreviation text here</abbr>
tabindexSpecifies a tab order for the element.

<abbr tabindex="1">Abbreviation text here</abbr>
Language
dirSpecifies the directional flow of the content.

<!-- The text will flow from left to right -->
<abbr dir="ltr">Abbreviation text here</abbr>
<!-- The text will flow from right to left -->
<abbr dir="rtl">Abbreviation text here</abbr>
langSpecifies a language code for the content of the element.

<abbr lang="en">Abbreviation text here</abbr>
spellcheckSpecifies an inline style for the element allowing you to apply the style to the contentt.

<!-- Valid values true and false. -->
<!-- Default inherited/browser specific. -->
<abbr spellcheck="true">Abbreviation text here</abbr> 
translateSpecifies an inline style for the element allowing you to apply the style to the content.

<!-- Valid values yes and no. -->
<!-- Default yes. -->
<abbr translate="no">Abbreviation text here</abbr> 
Miscellaneous
contenteditableSpecifies whether the content of the element is editable.

<!-- Valid values true and false. -->
<!-- Default inherited. -->
<abbr contenteditable="true">Abbreviation text here</abbr> 
draggableSpecifies whether the element is draggable.

<!-- Valid values true and false. -->
<!-- Default browser specific. -->
<abbr draggable="true">Abbreviation text here</abbr>
hiddenSpecifies whether the element is not yet, or no longer, relevant.

<!-- Valid values an empty string or hidden -->
<abbr hidden>Abbreviation text here</abbr> 
<abbr hidden="hidden">Abbreviation text here</abbr> 
<abbr> Event Attributes
Attribute Description Example
Document Element
oncopyThe script to be run when the user copies the content of an element.

 <!-- Executes go() function -->
<abbr oncopy="go()">Abbreviation text here</abbr> 
oncutThe script to be run when the user cuts the content of an element.

 <!-- Executes go() function -->
<abbr oncut="go()">Abbreviation text here</abbr>
onpasteThe script to be run when the user pastes some content into an element.

 <!-- Executes go() function -->
<abbr onpaste="go()">Abbreviation text here</abbr>
Drag and Drop
ondragThe script to be run when an element is dragged.

 <!-- Executes go() function -->
<abbr ondrag="go()">Abbreviation text here</abbr>
ondragendThe script to be run when an element has stopped being dragged.

 <!-- Executes go() function -->
<abbr ondragend="go()">Abbreviation text here</abbr>
ondragenterThe script to be run when an element has been dragged to a valid drop target.

 <!-- Executes go() function -->
<abbr ondragenter="go()">Abbreviation text here</abbr>
ondragleaveThe script to be run when an element leaves a valid drop target.

 <!-- Executes go() function -->
<abbr ondragleave="go()">Abbreviation text here</abbr>
ondragoverThe script to be run when an element is being dragged over a valid drop target.

 <!-- Executes go() function -->
<abbr ondragover="go()">Abbreviation text here</abbr>
ondragstartThe script to be run at the start of a drag operation.

 <!-- Executes go() function -->
<abbr ondragstart="go()">Abbreviation text here</abbr>
ondropThe script to be run when a dragged element is being dropped.

 <!-- Executes go() function -->
<abbr ondrop="go()">Abbreviation text here</abbr>
Form
onblurThe script to be run when the element loses focus.

 <!-- Executes go() function -->
<abbr onblur="go()">Abbreviation text here</abbr>
onchangeThe script to be run when object changed and attempt to leave field.

 <!-- Executes go() function -->
<abbr onchange="go()">Abbreviation text here</abbr>
oncontextmenuThe script to be run when a context menu is triggered.

 <!-- Executes go() function -->
<abbr oncontextmenu="go()">Abbreviation text here</abbr>
onfocusThe script to be run when the element gets focus.

 <!-- Executes go() function -->
<abbr onfocus="go()">Abbreviation text here</abbr>
oninputThe script to be run when an element gets user input.

 <!-- Executes go() function -->
<abbr oninput="go()">Abbreviation text here</abbr>
oninvalidThe script to be run when an element is invalid.

 <!-- Executes go() function -->
<abbr oninvalid="go()">Abbreviation text here</abbr>
onresetThe script to be run when a dragged element is being dropped.

 <!-- Executes go() function -->
<abbr onreset="go()">Abbreviation text here</abbr>
onselectThe script to be run when some or all of the contents of an object are selected.

 <!-- Executes go() function -->
<abbr onselect="go()">Abbreviation text here</abbr>
onsubmitThe script to be run when a form is submitted.

 <!-- Executes go() function -->
<abbr onsubmit="go()">Abbreviation text here</abbr>
Keyboard
onkeydownThe script to be run when an element is in focus and keyboard key is pressed down.

 <!-- Executes go() function -->
<abbr onkeydown="go()">Abbreviation text here</abbr>
onkeypressThe script to be run when an element is in focus and keyboard key is pressed down and released.

 <!-- Executes go() function -->
<abbr onkeypress="go()">Abbreviation text here</abbr>
onkeyupThe script to be run when an element is in focus and keyboard key is released.

 <!-- Executes go() function -->
<abbr onkeyup="go()">Abbreviation text here</abbr>
Media
onabortThe script code to be run on abort.

 <!-- Executes go() function -->
<abbr onabort="go()">Abbreviation text here</abbr>
oncanplayThe script to be run when a file has buffered enough so it is ready to start playing.

 <!-- Executes go() function -->
<abbr oncanplay="go()">Abbreviation text here</abbr>
oncanplaythroughThe script to be run when a file can be played all the way to the end without further need of buffering.

 <!-- Executes go() function -->
<abbr oncanplaythrough="go()">Abbreviation text here</abbr>
oncuechangeThe script to be run when the cue changes when using the track element.

 <!-- Executes go() function -->
<abbr oncuechange="go()">Abbreviation text here</abbr>
ondurationchangeThe script to be run when the length of the media is changed.

 <!-- Executes go() function -->
<abbr ondurationchange="go()">Abbreviation text here</abbr>
onemptiedThe script to be run when a media resource element suddenly becomes empty, usually due to an error.

 <!-- Executes go() function -->
<abbr onemptied="go()">Abbreviation text here</abbr>
onendedThe script to be run when the media has reach the end.

 <!-- Executes go() function -->
<abbr onended="go()">Abbreviation text here</abbr>
onloadeddataThe script to be run when media data is loaded and playback can start.

 <!-- Executes go() function -->
<abbr onloadeddata="go()">Abbreviation text here</abbr>
onloadedmetadataThe script to be run when metadata has been loaded.

 <!-- Executes go() function -->
<abbr onloadedmetadata="go()">Abbreviation text here</abbr>
onloadstartThe script to be run whenthe media resource has started loading.

 <!-- Executes go() function -->
<abbr onloadstart="go()">Abbreviation text here</abbr>
onpauseThe script to be run when the media resource has been paused.

 <!-- Executes go() function -->
<abbr onpause="go()">Abbreviation text here</abbr>
onplayThe script to be run when the media resource starts playback.

 <!-- Executes go() function -->
<abbr onplay="go()">Abbreviation text here</abbr>
onplayingThe script to be run when when playback has already begun.

 <!-- Executes go() function -->
<abbr onplaying="go()">Abbreviation text here</abbr>
onprogressThe script to be run when the browser is fetching the media data.

 <!-- Executes go() function -->
<abbr onprogress="go()">Abbreviation text here</abbr>
onratechangeThe script to be run when the playback rate changes.

 <!-- Executes go() function -->
<abbr onratechange="go()">Abbreviation text here</abbr>
onseekedThe script to be run when the seeking attribute is set to false indicating that seeking has finished.

 <!-- Executes go() function -->
<abbr onseeked="go()">Abbreviation text here</abbr>
onseekingThe script to be run when the seeking attribute is set to true indicating that seeking is currently active.

 <!-- Executes go() function -->
<abbr onseeking="go()">Abbreviation text here</abbr>
onstalledThe script to be run when the browser is unable to continue fetching media data.

 <!-- Executes go() function -->
<abbr onstalled="go()">Abbreviation text here</abbr>
onsuspendThe script to be run when media data has stopped before being completely loaded.

 <!-- Executes go() function -->
<abbr onsuspend="go()">Abbreviation text here</abbr>
ontimeupdateThe script to be run when the media resources current playback position has changed.

 <!-- Executes go() function -->
<abbr ontimeupdate="go()">Abbreviation text here</abbr>
onvolumechangeThe script to be run when the volume has changed or been muted.

 <!-- Executes go() function -->
<abbr onvolumechange="go()">Abbreviation text here</abbr>
onwaitingThe script to be run when the media resource has paused but is expected to resume.

 <!-- Executes go() function -->
<abbr onwaiting="go()">Abbreviation text here</abbr>
Mouse
onclickThe script to be run when when a mouse is clicked on an element.

 <!-- Executes go() function -->
<abbr onclick="go()">Abbreviation text here</abbr>
ondblclickThe script to be run when a mouse is double clicked on an element.

 <!-- Executes go() function -->
<abbr ondblclick="go()">Abbreviation text here</abbr>
onmousedownThe script to be run when he mouse button is pressed down while the cursor is over an element.

 <!-- Executes go() function -->
<abbr onmousedown="go()">Abbreviation text here</abbr>
onmousemoveThe script to be run when the mouse button is moved.

 <!-- Executes go() function -->
<abbr onmousemove="go()">Abbreviation text here</abbr>
onmouseoutThe script to be run when the mouse cursor moves off an element.

 <!-- Executes go() function -->
<abbr onmouseout="go()">Abbreviation text here</abbr>
onmouseoverThe script to be run when the mouse cursor moves over an element.

 <!-- Executes go() function -->
<abbr onmouseover="go()">Abbreviation text here</abbr>
onmouseupThe script to be run when the mouse button is released while the cursor is over the element.

 <!-- Executes go() function -->
<abbr onmouseup="go()">Abbreviation text here</abbr>
onwheelThe script to be run when the mouse wheel rolls up or down over an element.

 <!-- Executes go() function -->
<abbr onwheel="go()">Abbreviation text here</abbr>
Scroll
onscrollThe script code to be run when the scrollbar of an element is being scrolled.

 <!-- Executes go() function -->
<abbr onscroll="go()">Abbreviation text here</abbr> 
Window - NONE

Relevant HTML Tutorials

HTML Lessons - Formatting