- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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
What is nodeName property in JavaScript HTML DOM?
The nodeName property in JavaScript is used to specify the name of a node.
Example
You can try to run the following code to learn how to implement a nodeName property in JavaScript.
<!DOCTYPE html> <html> <body> <h1 id="id1">Tutorials</h1> <p id="id2">Demo Content</p> <p id="id3"></p> <p id="id4"></p> <script> document.getElementById("id3").innerHTML = document.getElementById("id1").nodeName; document.getElementById("id4").innerHTML = document.getElementById("id2").nodeName; </script> </body> </html>
- Related Articles
- HTML DOM nodeName Property
- What is nodeValue property in JavaScript HTML DOM?
- HTML DOM accessKey Property
- HTML DOM activeElement Property
- HTML DOM paddingLeft Property
- HTML DOM id Property
- HTML DOM innerHTML Property
- HTML DOM innerText Property
- HTML DOM parentElement Property
- HTML DOM parentNode Property
- HTML DOM previousSibling Property
- HTML DOM previousElementSibling Property
- HTML DOM readyState Property
- HTML DOM ownerDocument Property
- HTML DOM scrollHeight Property

Advertisements