HTML DOM namespaceURIProperty
Example
Return the URI of the XHTML document namespace:
document.documentElement.namespaceURI;
Output:
http://www.w3.org/1999/xhtml
Try it yourself »
Definition and Usage
The namespaceURI property returns the namespace URI for the selected node.
Note:Element nodes inherit the namespace of their parent node, therefore, the namespace URI of all elements in an XHTML document is "http://www.w3.org/1999/xhtml".
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the namespaceURI property.
Note:Internet Explorer 8 and earlier IE versions do not support this property.
Syntax
node.namespaceURI
Technical Details
| Return Value: | A string, representing the namespace URI of the node. |
|---|---|
| DOM Version | Core Level 2 Node Object |
Other Extensions
Element Object