HTML | DOM isId Property
The isId Property contains a boolean value which returns a true if the Element has an attribute type of ID, otherwise, it returns a false or undefined value. This Property is used for read-only.
Syntax:
attribute.isId
Return Value: It returns a Boolean value i.e true if the attribute type is ID, else it returns a false .
Example:
<!DOCTYPE html> <html> <body> <center> <h1 style="color:green;">GeeksForGeeks</h1> <h2> DOM isId Property</h2> <button onclick="geeks()">Submit</button> <p id="sudo"></p> <script> function geeks() { var x = document.getElementById("sudo"); x.innerHTML = x.attributes[0].isId; } </script> </body> </html> |
Output:

Supported Browser: No major browser support the Dom isID property.
Recommended Posts:
- HTML | DOM specified Property
- HTML | DOM name Property
- HTML | DOM Bdo dir Property
- HTML | DOM URL Property
- HTML | DOM dir Property
- HTML | DOM value Property
- HTML | DOM id Property
- HTML | DOM li value Property
- HTML | DOM childElementCount Property
- HTML | DOM clientWidth Property
- HTML | DOM scrollTop Property
- HTML | DOM scrollLeft Property
- HTML | DOM Progress max Property
- HTML | DOM implementation Property
- HTML | DOM nextElementSibling Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



