How to include an acronym in HTML?


In this article we are going to learn about how do we include an acronym in HTML. Let’s jump into the article one by one to get more idea.

In HTML, the acronym is defined using the <acronym> tag. An additional word is spelled out using the <acronym> tag. It serves as a resource for search engines, translation services, and browsers.

Note − use the <abbr> Tag because HTML 5 does not allow this tag.

Syntax

Following is the syntax for acronym.

<acronym title=""> Short Form </acronym>

Considering the following examples, to know more about how do we include an acronym in HTML.

Example 1

In the following example we are using <acronym> tag.

<!DOCTYPE html>
<html>
<body>
   <h1>USing Acronym</h1>
   <acronym title="TUTORIALSPOINT">TP</acronym>
   <br>
   <acronym title="OPERATING SYSTEM">OS</acronym>
</body>
</html>

When the script gets executed, it will generate an output consisting of text along with the acronym used on the webpage.

Example 2

Let’s look into the example where we are using the <abbr>

<!DOCTYPE html>
<html>
<body>
   <p>The <abbr title="World Health Organization">WHO</abbr> was founded in 1948.</p>
   <p>The <abbr title="Hypertext Markup Language">HTML</abbr> is designed to be displayedin a web browser.</P>
</body>
</html>

On running the above script, the output window pops up, displaying the text used with the <abbr> tag on the webpage .

Example 3

Consider the another example where we are using <acronym> tag.

<!DOCTYPE html>
<html>
<head>
   <title>HTML acronym Tag</title>
</head>
<body>
   <p><acronym title = "Hypertext Markup Language">HTML</acronym></p>
</body>
</html>

When the script runs, it will generate the output consisting of text used with the acronym tag on the webpage.

Updated on: 15-Dec-2022

169 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements