Skip to content
Related Articles

Related Articles

HTML | DOM specified Property

View Discussion
Improve Article
Save Article
  • Last Updated : 23 Jul, 2019

The DOM specified property is used to return the boolean value. It returns true if the element has a specified attribute, otherwise, it returns a false value if the element does not have a specific attribute.



Return value: It returns the boolean value which represent the specific attribute is attached to an element or not.


<!DOCTYPE html>
            HTML DOM specified Property
            <h1 style = "color:green">
            <h2>DOM specified Property </h2>
            <button onclick="Geeks()">
            <p id="sudo"></p>
                function Geeks() {
                    var x = 
                    var w = 
                    document.getElementById("sudo").innerHTML =

Before click on the button:

After click on the button:

Supported Browsers: The browser supported by DOM specified property are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!