• Post category:HTML

How to Open a Link in a New Tab HTML | Step by Step Guide

How to Open a Link in a New Tab HTML

In this article, we will see how to open a link in a new tab HTML. If you own a website and don’t know how to open a link in a new tab, you’ve come to the right place to learn. I hope I can solve your problem.

Step-by-step guide to open link in new tab.

  1. Create <a> anchor tag. An anchor is used to link one webpage to another.
  2. Then we use three important attributes of <a> tag. The “href” attribute is used to give a link to whatever you want. The “target” attribute, In this attribute we have to tell whether your link should open the same tab or a new tab.
  3. To open a link in a new tag, we should set the “target” attribute to “_blank”.

Example

<a href="#" target="_blank">Open in New tab</a>

Look at the code above, where the “target” attribute is used and set to “_blank”. So if you touch this link it will open in new tab.

Leave a Reply