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

HTML Reference Manual

Complete List of HTML Tags

HTML: <a> target attribute

The target attribute of the <a> tag specifies where the linked document should be opened

HTML <a> tag

Online Example

The target attribute specifies where the document linked to should be opened:

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>Basic Tutorial Website(oldtoolbag.com)</title> 
</head>
<body>
<a href="https://www.oldtoolbag.com" target="_blank">Open a new window, visit the basic tutorial website!</a>
</body>
</html>
Test See ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the target attribute

Definition and Usage

The target attribute of the <a> tag specifies where to open the linked document.

Syntax

<a 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 <a> tag