HTML target="_blank"

A target="_blank" attribute value specifies that the target page will be opened in a new browser tab. The target page can be a linked page or a response to a form submission.

Example

#

A target="_blank" on an <a> tag.
Clicking link will open the linked page in a new browser tab.

Go to Google
Go to <a target="_blank"
         href="https://google.com">Google</a>

Using target="_blank"

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

The target="_blank" value tells the browser that the page will be opened on a new browser tab.

This value allows users to stay on the current page, but still point them to the linked resource or response.


Syntax

<tagname target="_blank" />

Elements that accept target

These elements accept the the target attribute with a _blank value.

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