Open the link in a new tab or window in Html

Open the link in a new tab or window in Html

In this post we will give you information about Open the link in a new tab or window in Html. Hear we will give you detail about Open the link in a new tab or window in HtmlAnd how to use it also give you demo for it if it is necessary.

we are going to learn about how to open the anchor link in a new tab or window in Html.

Normally, we create a link using the anchor (<a>) html element.

&lt;a href="https://onlinecode.org"&gt;Click me&lt;/a&gt;

If we click on the above link, it will open a google.com in the same tab.

Opening link in a new tab

To open the link in a new tab, we need to add target attribute with a value _blank to the <a> element.

Here is an example:

&lt;a href="https://onlinecode.org" target="_blank"&gt;Click me&lt;/a&gt;

Note: If you are using the target=_blank, your page performance may suffer to avoid that you can use rel=”noreferrer noopener”.

&lt;a href="https://onlinecode.org" target="_blank" rel="noreferrer noopener"&gt;   Click me&lt;/a&gt;

Hope this code and post will helped you for implement Open the link in a new tab or window in Html. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs

For More Info See :: laravel And github

We're accepting well-written guest posts and this is a great opportunity to collaborate : Contact US