HTML target="framename"

A target="framename" attribute value specifies that the linked page or form response will be opened in the named frame.

Example

#

A target="framename" attribute value on an <a> tag.
Clicking the link will open the linked page in the specified <iframe>.

Click to learn more about Claude Monet.

<p>
  Click to learn more about 
  <a target="display-frame" 
     href="https://en.wikipedia.org/wiki/Claude_Monet" >Claude Monet</a>.
</p>

<iframe name="display-frame"
        style="width:100%;height:600px;border:2px solid #4e46e5;"></iframe>

Using target="framename"

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

The target="framename" value opens the linked page or form response in the named frame.

Its value is the name of an iframe.


Syntax

<tagname target="framename" />

Elements that accept target

These elements accept the framename 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