How to open a link in a new window (HTML)

How to open a link in a new window (HTML)

  • by Zach (173)
  • Time to complete: 1 minute

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.

1

Add the target="_blank" attribute to the a href tag.

Opens Google in a new window