Open link in new tab or window

Rene picture Rene · Mar 21, 2013 · Viewed 1.5M times · Source

Is it possible to open an a href link in a new tab instead of the same tab?

<a href="http://your_url_here.html">Link</a>

Answer

Nathan picture Nathan · Mar 21, 2013

You should add the target="_blank" and rel="noopener noreferrer" in the anchor tag.

For example:

<a target="_blank" rel="noopener noreferrer" href="http://your_url_here.html">Link</a>

Adding rel="noopener noreferrer" is not mandatory, but it's a recommended security measure. More information can be found in the links below.

Source: