Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

HTML | DOM isDefaultNamespace() Method

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

The DOM isDefaultNamespace() method is used to return boolean true if the specified namespace is default otherwise, it returns boolean false. The URI of the namespace required can be checked using the namespaceURI string. 



Return Value: It returns a boolean value true if the namespace is default, otherwise it returns false. 

Example: Return DefaultNamespace property. 


<!DOCTYPE html>
        HTML | DOM isDefaultNamespace() Method
        <button onclick="space()">
      Clicking on the 'Press' button will display
      if the specified namespace is default.
    <p id="demo"></p>
        function space() {
            // Access and return default namespace property.
            var d =
            var x =
            document.getElementById("demo").innerHTML =


Before clicking on the button:


After clicking on the button:


Note: Internet Explorer8 and earlier versions don’t support this method. 

Browser Support: The browsers supported by DOM isDefaultNamespace() method are listed below:

  • Google Chrome 1 and above
  • Edge 12 and above
  • Internet Explorer 9.0 and above
  • Firefox 1 and above
  • Opera 12.1 and above
  • Safari 3 and above

My Personal Notes arrow_drop_up
Last Updated : 12 Jul, 2022
Like Article
Save Article
Similar Reads
Related Tutorials