Abbreviation HTML

HTML <abbr> Tag

To represent an acronym or abbreviation (eg. www, HTML, HTTP, etc.) of a word or a phrase the HTML <abbr> tag is used. In some browsers, the <abbr> contents are rendered with a dotted underline. When the HTML <abbr> tag is used with the HTML “title” attribute, the value of the title attribute will pop up when the mouse hovers over the content written between <abbr> tags.

Syntax:

<abbr title="HyperText Markup language">HTML</abbr>

Example: Without the HTML “title” attribute.

<!DOCTYPE html>
<html>
<body>
<h2>Example</h2>  
<p>Hello World!! You are learning <abbr>HTML</abbr>.</p>  
</body>
</html>

Explanation:

In the above example, we are using the HTML <abbr> attribute without the HTML “title” attribute.

Example: With the HTML “title” attribute.


<!DOCTYPE html>
<html>
<body>
<h2>Example</h2>  
<p>Hello World!! You are learning <abbr title="Hyper Text Markup Language">HTML</abbr>.</p>  
</body>
</html>

Explanation:

In the above example, we are using the HTML <abbr> attribute with the HTML “title” attribute.

Global attributes:

The HTML global attributes are supported by the HTML <abbr> tag.

Event Attributes:

The HTML event attributes are supported by the HTML <abbr> tag.

Supporting Browsers:

Chrome, IE, Firefox, Opera, and Safari.