Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
HTML DOM Abbreviation Object
The <abbr> element is used in HTML to display abbreviations. The Abbreviation object represent this <abbr> element.
In the below example, we will learn how to access an abbreviation object −
Example
<!DOCTYPE html> <html> <body> <h2>Demo Heading</h2> <abbr id="myid" title="Board of Control for Cricket in India">BCCI</abbr> <button onclick="display()">Display the abbreviation title</button> <p id="demo">Abbreviation Title<script> function display() { var a = document.getElementById("myid").title; document.getElementById("demo").innerHTML = a; } </script> </body> </html>
Output

Click on the button to display the title −

Advertisements
