You are here: Reference > HTML > attributes > target (a, area, base, form, link)

target attribute (a, area, base, form, link)

Browser support:
Specifies the target window or frame where the document is to be opened.
JavaScript page for this attribute: target. You can find other example(s) there.

Possible values:

String that identifies the target window.
One of the following values:
Indicates a new window.
Indicates the HTML content area of the Media Bar.
Indicates the parent frame.
Indicates the browser search panel.
Default. Indicates the frame containing the source link.
Indicates the topmost window.
Target name
The name of the target window or frame (frame or iframe). If there is no window or frame with the specified name opened for the current document, a new window will be opened, otherwise the target references the matching window.
Default: _self.

Example HTML code 1:

This example illustrates the use of the target attribute:
<a id="myAnchor" href="frame.htm" target="TargetFrame">Click on it!</a>
<iframe name="TargetFrame" src="" height="150px" width="200px"></iframe>
Did you find this example helpful? yes no

Supported by tags:

External links:

User Contributed Comments

Post Content

Post Content