Borja
Borja

Reputation: 3551

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

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)....

Upvotes: 77

Views: 59780

Answers (3)

aj7tt
aj7tt

Reputation: 129

Both target="_blank" && target="blank" will open new window or tab. The difference is

target="_blank"

On every click, it will open in a new window.

target="blank"

On another (Multiple) clicks, it will Open in the same window that opened for the first click (reuses the same tab). It reuses the same tab for all the linked documents with attribute ="blank"


Upvotes: 12

TommY
TommY

Reputation: 838

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.

Upvotes: 34

Quentin
Quentin

Reputation: 943208

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.

Upvotes: 129

Related Questions