The <abbr>
tag represents an abbreviation (e.g. HTML, GIF, XML).
The title attribute adds a description to the abbreviation.
Hovering the element will display a tooltip with the description.
An abbreviation with tooltip, created with an <abbr>
tag.
Our RDBMS is SQL Server.
<p>
Our <abbr title="Relational Database Management System">RDBMS</abbr>
is SQL Server.
</p>
abbr
= abbreviation
An <abbr>
tag. Hover the word HTML and a tooltip with Hypertext Markup Language will appear.
We use HTML to compose our web pages.
<p>
We use
<abbr title="Hypertext Markup Language">HTML</abbr>
to compose our web pages.
</p>
The <abbr>
element has no attributes, but it does accept global attributes.
The following are commonly used:
Attribute | Value | Description |
---|---|---|
title | description | Required. Sets the description or expansion of the abbreviation. |
id | identifier | Defines a unique identifier for the abbr. |
class | classnames | Sets one or more CSS classes to be applied to the abbr. |
style | CSS-styles | Sets the style for the abbr. |
For additional global attributes see our global attributes list.
By default, the <abbr>
tag adds an underline to the text.
This can be removed using the CSS property text-decoration
.
An <abbr>
element without underline.
HTML is what we study today.
<p>
<abbr style="text-decoration: none;"
title="Hyper Text Markup Language">HTML</abbr>
is what we study today.
</p>
Here is when <abbr>
support started for each browser:
Chrome
|
1.0 | Sep 2008 |
Firefox
|
1.0 | Sep 2002 |
IE/Edge
|
1.0 | Aug 1995 |
Opera
|
1.0 | Jan 2006 |
Safari
|
1.0 | Jan 2003 |