Skip to content
Related Articles

Related Articles

Improve Article
HTML | DOM namespaceURI property
  • Last Updated : 28 May, 2020

The namespaceURI DOM property returns the URI of the specified node’s namespace. This property is read only.

Note: Internet Explorer 8 and earlier versions don’t support this property.

Return value: A string which represents the URI of the node’s namespace, or null if the node isn’t during a namespace.

Syntax:

node.namespaceURI

Example:






<!DOCTYPE html>
<html>
  
<body>
    <h1>GeekforGeeks</h1>
    <h2>Click On the Button</h2>
  
    <button onclick="show()">
        Click Here !
    </button>
      
    <p id="uri"></p>
  
    <script>
        function show() {
            var x = document.
                documentElement.namespaceURI;
                  
            document.getElementById(
                "uri").innerHTML = x;
        }
    </script>
  
</body>
  
</html>

Output:

Before Clicking the Button:

After Clicking the Button:

Supported Browsers: The browsers supported by DOM isDefaultNamespace() method are listed below:

  • Google Chrome
  • Internet Explorer 9.0
  • Firefox
  • Opera
  • Safari
My Personal Notes arrow_drop_up
Recommended Articles
Page :