Search w3schools.com:

SHARE THIS PAGE

DOM Node namespaceURI Property

Node Object Reference Node Object

Example

Get the URI of the namespace for an XHTML document:

document.documentElement.namespaceURI;

The result will be:

http://www.w3.org/1999/xhtml

Try it yourself »

Definition and Usage

The namespaceURI property returns URI of the specified node's namespce.

Note: An element node inherits the namespace of its parent node, therefore, all elements in an XHTML document has the namespaceURI "http://www.w3.org/1999/xhtml".


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The namespaceURI property is supported in all major browsers.

Note: Internet Explorer 8 and earlier does not support this property.


Syntax

node.namespaceURI

Technical Details

Return Value: A String, representing the URI of the node's namespace
DOM Version Core Level 2


Node Object Reference Node Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]