HTML <abbr> tag is used to represent an acronym or abbreviation of a longer word or phrase, such as www, HTML, HTTP, etc. The content written between <abbr> tags renders with dotted underline in some browser.
This tag can be used with “title” attribute (optional), and the value of title attribute will be pop-up when the mouse hovers over the content written between <abbr> tag.
Syntax
<abbr title="HyperText Markup language">HTML</abbr>
Following are some specifications about the HTML <abbr> tag
| Display | Inline |
| Start tag/End tag | Both Start tag and End tag |
| Usage | Semantic/Textual |
Example
With title Attribute:
<!DOCTYPE html>
<html>
<head>
<title>Abbreviation Tag</title>
</head>
<body>
<h2>Abbreviation tag example</h2>
<p><b>Hover mouse over the content and see the abbreviation</b></p>
<abbr title="Hyper Text Transfer protocol">HTTP</abbr>
</body>
</html>
Example
Without title Attribute:
<!DOCTYPE html>
<html>
<head>
<title>Abbreviation tag</title>
</head>
<body>
<h2>Abbreviation tag Example</h2>
<p><abbr>CPU</abbr> is brain of a Computer</p>
</body>
</html>
Global attributes:
The <abbr> tag supports the global attributes.
Event Attributes:
The <abbr> tag supports the event attributes.
Supporting Browsers
| Element | Chrome | IE | Firefox | Opera | Safari |
| <abbr> | Yes | Yes | Yes | Yes | Yes |
Chrome
IE
Firefox
Opera
Safari