<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
>


<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<body>

<p >Click the button get the URI of the document's namespace.</p>

<button onclick="myFunction()">Try it</button>

<p><strong>Note:</strong> Internet Explorer 8 and earlier does not support the namespaceURI property.</p>

<p id="demo"></p>

<script>
function myFunction() {
    var x = document.documentElement.namespaceURI;  
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>