The Difference Between target=_blank and target=blank

Html

Nicesnippets

427

10-07-2021


Hi Guys,

In this example,I will learn you how to difference between target=_blank and target=blank in html.you can easy and simply difference between target=_blank and target=blank in html.

target is an optional attribute of an anchor tag. It is used to determine where a linked URL will open within the current browsing context.

In this tutorial, I will give you an example of the Difference Between target=blank and target=_blank in Html, So you can easily apply it with your Html pages.

target=’blank’ :


When we omit the underscore, we are telling the browser to open the link in a tab called 'blank' instead of opening a new one. If the 'blank' tab doesn’t exist yet, then the browser will create it and open the link in the newly created tab. This is why target=blank can at first appear to work the same as target=_blank.

<a href="https://www.nicesnippets.com/" target="blank">www.nicesnippets.com</a>

<a href="https://www.google.com" target="blank">www.google.com</a>

The target=”blank” attribute will open a new window at the first time and this window will be reused after the first.

target=’_blank’ :

If we give a link element the attribute target=_blank, every time the link is clicked it will always open the link in a new tab. I say tab, but it is worth bearing in mind that users can configure browsers to open a new window instead.

<a href="https://www.nicesnippets.com/" target="_blank">www.nicesnippets.com</a>

<a href="https://www.google.com" target="_blank">www.google.com</a>

In short, use target=”_blank” attribute it always open a new tab or window.

It will help you...