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.
- Create <a> anchor tag. An anchor is used to link one webpage to another.
- 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.
- 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.