MDN Web Docs

Value

A string representing the base URL of the Node.

Examples

Without <base>

html

<output>Not calculated</output>

js

const output = document.querySelector("output");
output.value = output.baseURI;

With <base>

html

<base href="https://developer.mozilla.org/modified_base_uri/" />
<output>Not calculated</output>

js

const output = document.querySelector("output");
output.value = output.baseURI;

Specifications

Specification
DOM
# ref-for-dom-node-baseuri①

Browser compatibility

See also

Help improve MDN

Yes No

Learn how to contribute

This page was last modified on by MDN contributors.

Read the original on developer.mozilla.org ↗