X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML DOM namespaceURI Property

Element Object Reference Element 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


Element Object Reference Element Object


Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook