English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag Reference

HTML: <base> target attribute

The target attribute specifies the default target for all hyperlinks and forms on the page. It can be used by each hyperlink/The form's target attribute can override this attribute.

 HTML <base> tag

Online Example

Specify the default target for all hyperlinks and forms on the page:

<!DOCTYPE html>
<html>
<head>
<title>HTML: <base> target attribute - Basic Tutorial Website oldtoolbag.com</title>
<base target="_blank">
</head>
<body>
<p><a href="https://www.oldtoolbag.com">Basic Tutorial Website</a> - 
Please note that even without the target="_blank" attribute, the link will open in a new window. This is because the target attribute of the basic element is set to "_blank"./p>
</body>
</body>
</html>
Test to see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the target attribute.

Definition and Usage

Specify the default target for all hyperlinks and forms in the page using the target attribute.
By using each hyperlink/The form's target attribute can override this attribute.

HTML 4.01 with HTML5differences

HTML5Frames and framesets are no longer supported. Therefore, _parent, _top, and framename values are now mainly used for iframe.

Syntax

<base target="_blank|_self|_parent|_top|framename">

Attribute value

>
ValueDescription
_blankOpen the linked document in a new window.
_selfDefault. Open the linked document in the same frame.
_parentOpen the linked document in the parent frame set.
_topOpen the linked document in the entire window.
framenameOpen the linked document in the specified frame.
 HTML <base> tag