target
The target attribute specifies where to open a link or submit a form, such as a new tab or a named frame.
Syntax
target="_blank" Examples
<a href="/terms" target="_blank" rel="noopener">Terms (new tab)</a>
<form action="/search" target="results"></form>
Output
Opens the terms page in a new browsing context and submits the form into a frame named "results".
Notes
Keywords: _self (default), _blank, _parent, _top. Always pair target="_blank" with rel="noopener" to prevent the opened page from accessing window.opener.
Browser & runtime support
| Environment | Since version |
|---|---|
| chrome | 1.0 |
| firefox | 1.0 |
| safari | 1.0 |
| edge | 12 |