difference-target blank vs target_blank_in_html

Difference Between target=blank and target=_blank

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.

First, what we’re doing here, This is the example :

Difference Between target=blank and target=_blank

The target attribute in Html

Target is an optional attribute of an anchor tag in Html. It is used to determine where a linked URL will open within the current browsing context. By browsing context, we refer to a tab, a window, or an iframe, using the target attribute.

If you want to know more about The Anchor element.

target=_blank vs target=blank

In the given below example, we will create two anchor links, the first one for Google and the other is for Yahoo.
and also we will use target= ‘blank’ and target=’_blank’ attribute.

Demo Example : click here.

target=’blank’ :

 <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’ :

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

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

Final Words :

In this article, we learned the concept of target=blank and target=_blank attributes in Html, I hope this article will help you with your Html and other application Project.

Also Read : How to add datatables in html table.

2 thoughts on “Difference Between target=blank and target=_blank”

  1. Akansha Sharma

    Nice blog. That’s really help me to understand this minor difference between both of these attributes.

Comments are closed.