The <abbr>
tag is short for abbreviation. It is used to write an acronym or an abbreviation.
<abbr title="Full Form"> Abbreviation </abbr>
In the above snippet of code, the full form or detail of the abbreviation is passed as a string to the title
attribute.
When we hover the mouse over the abbreviation, the browser shows its full form. Some browsers display the abbreviations inline with the rest of the content, and some add a break automatically. A few browsers also underline the abbreviation with a dotted line.
In the example below, HTML is an abbreviation for Hypertext Markup Language. The full form of the abbreviation can be seen by hovering over it:
In the example below, the <abbr>
tag is used twice. The full forms of the abbreviations can be seen by hovering over them:
Free Resources