<abbr> element in HTML is used to markup and define an abbreviation or acronym. It provides a way to indicate the full meaning or expanded form of an abbreviation when it is encountered in the content.
Here’s an example of how to use the
The WHO is a specialized agency of the United Nations.
<p> The <abbr title="World Health Organization">WHO</abbr> is a specialized agency of the United Nations. </p>
In this example, the
<abbr> element is used to mark up the abbreviation “WHO” for the World Health Organization. The
title attribute is used to provide the full meaning or expanded form of the abbreviation, which is displayed as a tooltip when the user hovers over the abbreviation. This helps to clarify the meaning of the abbreviation for those who may not be familiar with it.
It’s important to note that the
title attribute is essential for providing the full meaning of the abbreviation, so it should be included whenever using the
<abbr> element. Additionally, you can style the
<abbr> element using CSS to adjust its appearance, such as changing the font weight, color, or adding underline.
In summary, the
<abbr> element is used in HTML to mark up and define abbreviations or acronyms. It helps to provide a clear and concise explanation of the abbreviated term, enhancing the accessibility and understanding of the content for readers.