Table of Contents
INTRODUCTION
The <abbr> element is used for abbreviations or acronym. This text is shown by browser with an dotted underline. <abbr> element marks the text to inform user that text is abbreviation. It does not provide its full expansion.
Full expansion of abbreviation needs to be provided seperately. You can use the title attribute to provide full expansion of abbreviation which can be seen as tooltip when user hover mouse over it.
Syntax:
<abbr title="">--text--</abbr>
Example:
<p>
I am <abbr title="">HTML</abbr> abbreviation without title attribute. If you hover the cursor over HTML then no tooltip is shown.
</p>
I am HTML abbreviation without title attribute. If you hover the cursor over HTML then no tooltip is shown.
ATTRIBUTES
1. title
It is used to provide full expansion of abbreviation. It is shown as tooltip by browser.
Example:
<p>
I am <abbr title="Hypertext Markup Language">HTML</abbr> abbreviation
with title attribute. If you hover the cursor over HTML then tooltip is shown.
</p>
I am HTML abbreviation with title attribute. If you hover the cursor over HTML then tooltip is shown.
Tag Omission
The HTML <abbr> element must have both start tag and end tag.