HTML target="_parent"

A target="_parent" attribute value specifies that the target page will be opened in a parent frame. The target page can be a linked page or a response to a form submission.

Example

#

A target="_parent" on an <a> tag. This link resides inside an <iframe>.
Clicking the link will open the linked page in the current browser tab (the parent).

Note:  Without target="_parent" the linked page would open inside the iframe.

<iframe width="300" height="100"
        style="border:3px dashed #808cf8;padding:30px 0 0 30px"
        srcdoc="<a target='_parent' href='/html'>HTML Tutorial</a>">
</iframe>

Using target="_parent"

The target attribute specifies where the linked page or form response will be opened.

The target="_parent" value opens the page in the parent frame (frame, tab, or window).

If no parent frame can be detected, the page will display in the current frame.


Syntax

<tagname target="_parent" />

Elements that accept target

These elements accept the _parent value on the target attribute.

Elements Description
<a> Specifies an anchor link -- see example above
<area> Creates clickable areas inside an image map.
<base> Sets the base URL for all relative URLs on a page or site..
<form> Specifies an HTML form.

Browser support

Here is when target support started for each browser:

Chrome
1.0 Sep 2008
Firefox
1.0 Sep 2002
IE/Edge
1.0 Aug 1995
Opera
1.0 Jan 2006
Safari
1.0 Jan 2003

You may also like

Guides