How to open a hyperlink in another window or tab with HTML?

Spread the love

To open a hyperlink in another window or tab with HTML, we set the target attribute.

For instance, we write

<a href="http://www.example.com/" target="_blank">Starfall</a>

to add a link that opens http://www.example.com/ in a new tab.

We set the target attribute to _blank to open the link in a new tab.

Leave a Reply

Your email address will not be published. Required fields are marked *