The target attribute on a <base> tag specifies where to open the linked page when any of the relative links is clicked.
Links can be open in the same tab, a new tab, a new window, and more.
A target attribute on a <base> element.
All links on the page will open in a new browser tab.
<head>
<base target="_blank" href="https://en.wikipedia.org/wiki/">
</head>
<nav>
<a href="Vincent_van_Gogh">Vincent Van Gogh</a> <br />
<a href="Henri_Matisse">Henri Matisse</a> <br />
<a href="Paul_Cézanne">Paul Cézanne</a>
</nav>
A target attribute on a <base> element specifies the window/tab where all relative links on the page are opened.
Links can be opened in the same tab, a new tab, a new window, or in an iframe.
If a target is not specified, all links open in the same tab/window.
The target attribute on a <base> element can be overriden with a target
attribute on an <a>, <area>, or <form> element.
<tagname target="_self | _blank | _parent | _top | framename" />
Value | Description |
---|---|
_self | Opens the page in the same tab/window. This is the default. |
_blank | Opens the page in a new tab. |
_parent | Opens the page in the parent iframe. In the same iframe if there is no parent. |
_top | Opens the page in the topmost part of the iframe. In the same iframe if there is no topmost. |
framename | Opens the page in a named iframe. |
Here is when target support started for each browser:
Chrome
|
1.0 | Sep 2008 |
Firefox
|
1.0 | Sep 2002 |
IE/Edge
|
1.0 | Aug 1995 |
Opera
|
1.0 | Jan 2006 |
Safari
|
1.0 | Jan 2003 |