- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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