HTML abbr tag

Html <abbr> tag defines abbreviated form of some term. Abbreviation shortens the phrase in which we take the first letter of each word in a phrase.

Example

<p><abbr title="World Health Organization">WHO</abbr> is a specialised  gency of the United Nations that is concerned with international public   health. It was established on 7 April 1948, headquartered in Geneva,       Switzerland.
 </p>
 <!----and now with link--->
 <p><abbr title="World Health Organization"><a href="http://www.who.int"  target="_blank">WHO</a></abbr> is a specialised agency of the United   Nations that is concerned with international public health. It was         established on 7 April 1948, headquartered in Geneva, Switzerland.
</p>
Try </>

Title attribute represents the expanded form of abbreviated text.

Specific use

why abbr?

Instead of writing a term expansion in parentheses, we should use <abbr>. For example, WHO (World Health Organization) is the same as

<p><abbr title="World Health Organization"> WHO </abbr>.</p>

In a document, abbreviation annotations can be made. Annotations can be styled using CSS properties or style sheet.

Example

<p> <abbr title="World Wide Web" style="background-color:lightgreen; border:1px solid green;"> WWW </abbr>.</p>

Try</>

Tag omission

Both starting and ending tags are necessary for the abbr element.

Global Attributes

All global attributes are applicable on the abbr element.

Specific Attributes

<abbr> tag attributes

TagsDescription
title Title attribute defines the expanded form of the abbreviated term.
<abbr title="Cascading Style Sheet">CSS</abbr> is abbreviation of cascading style sheet.


Was this article helpful?

 

Email:

Message:

Get the newsletter