How to mark abbreviation or acronyms in HTML?


We use shortened versions to represent a series of letters.

The HTML <abbr> tag, used to define an abbreviation or an acronym, like "HTML", "CSS", "Mr.", etc.

Syntax

Following is the syntax for the <abbr> tag.

<abbr title="Delhi Land and Finance">DLF</abbr>

Example

Following is the example program for the <abbr> tag.

<!DOCTYPE html> <html> <head> <title>HTML abbr tag</title> </head> <body> <h1>Timings</h1> <p> We follow <abbr title="Artificial intelligence">AI</abbr> for our webinars. </p> </body> </html>

Example

Following is one more example program for the <abbr> tag.

<!DOCTYPE html> <html> <head> </head> <body> <p>DLF stands for <abbr title="Delhi Land and Finance">DLF</abbr></p> <p>Delhi Land and Finance is one of the largest commercial real estate developer in India.</p> </body> </html>

Example

Following is one more example program for the <abbr> tag.

<!DOCTYPE html> <html> <head> <title>HTML abbr tag</title> </head> <body> <abbr title = "Ante Meridiem">AM</abbr> <br> <abbr title = "Post Meridiem">PM</abbr> <br> <abbr title = "Indian Standarad Time">IST</abbr> </body> </html>

When we place the mouse cursor on the specified text and hold, it will show the abbreviation of the text.

Updated on: 11-Nov-2022

231 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements