HTML a target Attribute
HTML <a> tag
Definition and Usage
The target attribute specifies where the URL (web resource) should be opened.
Syntax
Syntax Example
Attribute Values
Value |
Description |
_blank |
The target URL will open in a new window. |
_self |
The target URL will open in the same frame as it was
clicked. |
_parent |
The target URL will open in the parent frameset. |
_top |
The target URL will open in the full body of the window. |
framename |
The name of the target frame the URL should open in. |
Browser Support

The attribute is supported in all major browsers.
Example
Source |
Output |
<p>Open target in new window:
<a href="http://www.w3schools.com" target="_blank">
W3Schools</a></p>
<p>Open target current frame:
<a href="http://www.w3schools.com" target="_self">
W3Schools</a></p>
|
Open target in new window:
W3Schools
Open target current frame:
W3Schools
|
Try-It-Yourself Demos
a target
attribute example
Specify where the target window of the hyperlink.
HTML <a> tag
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|