Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between target="_blank" and target="blank"?

Tags:

html

hyperlink

Since I approached the web programming, to open a link in a new window I always used

target="blank" 

but most of the time, here and in the rest of the web I have ever seen use:

target="_blank" 

Both forms work (of course), but I do not know the difference between the two versions and they do not know what the correct way (and why)....

like image 817
Borja Avatar asked Feb 29 '16 15:02

Borja


People also ask

Is it blank or _blank?

blank targets an existing frame or window called "blank". A new window is created only if "blank" doesn't already exist. _blank is a reserved name which targets a new, unnamed window.

When should I use target _blank?

The most common reason to use `target=”_blank” is so that offsite links open in a separate tab. This allows a user to click on a reference and come back to it later without leaving the current page. It keeps visitors on your site longer and improves most of your metrics: bounce rate, conversion, pages visited.

Is Target _blank deprecated?

It looks like target="_blank" is still alright. It is listed as a browsing context keyword in the latest HTML5 draft.

What does the target _blank attribute do?

A target attribute with the value of “_blank” opens the linked document in a new window or tab. A target attribute with the value of “_self” opens the linked document in the same frame as it was clicked (this is the default and usually does not need to be specified).


2 Answers

blank targets an existing frame or window called "blank". A new window is created only if "blank" doesn't already exist.

_blank is a reserved name which targets a new, unnamed window.

like image 171
Quentin Avatar answered Sep 19 '22 18:09

Quentin


In short, use target="_blank" it always open a new window but use target="blank" it will open a new window at the first time and this window will be reused after the first.

like image 25
TommY Avatar answered Sep 18 '22 18:09

TommY