HTML <base> Element Reference

The HTML <base> element establishes the base URL and default browsing context used by relative links in a document.

<base>

HTML <base> Element Reference

The HTML <base> element establishes the base URL and default browsing context used by relative links in a document.

Categories

  • Document metadata

Tag omission

This is a void element and does not have an end tag.

Content model

  • Detailed content-model guidance will be added to this reference.

Attributes

Examples

Example

A practical base element example.

<head>
  <base href="https://example.com/docs/">
</head>

Related references

Description

The HTML <base> element establishes the base URL and default browsing context used by relative links in a document.

References

  1. HTML Living Standard: Index of elements
  2. MDN: HTML <base> Element

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies