HTML <abbr> tagS2C Home   « 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 Basics - Formatting