New! My 44-page ebook "CSS in 44 minutes" is out! 😃

Get it now →

# base

Defines the base URL for all relative links of a web page. Should be placed in the <head>.

Example: Copy

<base href="">
<a href="/element/base">The HTML base element</a>
<!-- This will be an absolute link to -->


Defines the base target of all links of the web page.


You can pass an absolute URL.


Defines in which tab or window the links of the web pages will show up.


Opens in a new browsing context, which is usually a new tab.


Opens in the current tab.


Opens in the parent browsing context, or _self is there is none.


Opens in the top browsing context, or _self is there is none.