The DOM baseURI property is used to return the base Uniform Resource Identifier (URI) of the document. This property is used for read-only. This property returns a string value that represents the base URI of the page.
Syntax:
node.baseURI
Example:
<!DOCTYPE html> <html> <body> <title>baseURI property</title> <style> h1 { color:green; } body { text-align:center; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h2>DOM baseURI Property</h2> </h2> <button onclick = "geeks()">Submit</button> <p id="gfg"></p> <script> function geeks() { var x = document.baseURI; document.getElementById("gfg").innerHTML = "The base URI of the page: " + x; } </script> </body> </html> |
chevron_right
filter_none
Output:

Supported Browsers: The browser supported by DOM baseURI are listed below:
- Google Chrome
- Firefox
- Opera
- Safari
Recommended Posts:
- HTML | DOM dir Property
- HTML | DOM URL Property
- HTML | DOM Bdo dir Property
- HTML | DOM id Property
- HTML | DOM specified Property
- HTML | DOM li value Property
- HTML | DOM value Property
- HTML | DOM Map name Property
- HTML | DOM name Property
- HTML | DOM Ul type Property
- HTML | Window self( ) Property
- HTML | Window top( ) Property
- HTML | DOM Div align Property
- HTML | DOM isId Property
- HTML | DOM Fieldset name Property
- HTML | DOM Ol type Property
- HTML | DOM IFrame src Property
- HTML | DOM Ol start Property
- HTML | DOM offsetParent Property
- HTML | DOM ol compact Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


