HTML <base> Tag
The base tag specifies the starting point and/or destination for all relative URLs in a document.
Either a href
or a target property, or both, must be included in the tag. In a document, there may only be one element, and it must be included within the <head>
element.
Syntax
Attributes
Attribute | Value | Description |
---|---|---|
href | URL | Specifies the starting point for relative URLs on the page. It might be an absolute or relative URL. These are some examples: href="https://www.webtutor.dev/html/" href="/html/" href="html/" |
target |
_blank
_parent _self _top |
Specifies where the referenced resource should be displayed. |
Supported Browsers
Element | Chrome | Firefox | Safari | Edge / IE | Opera |
---|---|---|---|---|---|
<base> | Yes | Yes | Yes | Yes | Yes |