How to open a link in a new window (HTML)
When building a website, it's a good idea to open external links (e.g. http://google.com) in a new window so that users aren't directed away from your site.
Posted in these interests:
When building a website, it's a good idea to open external links (e.g. http://google.com) in a new window so that users aren't directed away from your site.
Add the target="_blank" attribute to the a href tag.
<a href="http://google.com" target="_blank">Opens Google in a new window</a>
If you found this useful, visit our guide on how to open the telephone app using an HTML link.
Ever wondered what some of the homepages you visit daily looked like when they first launched?