Set the target attribute of the link to _blank:

<a href="#" target="_blank" rel="noopener noreferrer">Link</a>

For other examples, see here: http://www.w3schools.com/tags/att_a_target.asp


Note

I previously suggested blank instead of _blank because, if used, it'll open a new tab and then use the same tab if the link is clicked again. However, this is only because, as GolezTrol pointed out, it refers to the name a of a frame/window, which would be set and used when the link is pressed again to open it in the same tab.


Security Consideration!

The rel="noopener noreferrer" is to prevent the newly opened tab from being able to modify the original tab maliciously. For more information about this vulnerability read the following articles:

  • The target="_blank" vulnerability by example
  • External Links using target='_blank'
Answer from SharkofMirkwood on Stack Overflow
🌐
W3Schools
w3schools.com › tags › tryit.asp
W3Schools online HTML editor
The W3Schools online code editor allows you to edit code and view the result in your browser
Discussions

html - Open link in new tab or window - Stack Overflow
My two cents to try to put a little more of a user experience perspective on things. 2014-01-30T05:44:54.38Z+00:00 ... I would agree with the "shouldn't" for websites, but remember that not all HTML is written for websites. I was thinking of something for an in-house web-app where it would be nice make some links open in new tabs ... More on stackoverflow.com
🌐 stackoverflow.com
Force all external links into a new tab?
I am trying to get the clickthrough URL of each image in my galleries to open in a new tab. I did some digging and I noticed that each gallery image has the on it. So I am thinking if I can have anything that has that class open in a new tab I should be good? Ho... More on forum.squarespace.com
🌐 forum.squarespace.com
36
January 12, 2014
How to open Custom HTML Link to open in new tab | WordPress.com Forums
If you’re using the current WordPress editor, just highlight the word(s) you want to link, paste the URL, and toggle “Open in a new tab” in the box that appears. It looks like this: The topic ‘How to open Custom HTML Link to open in new tab’ is closed to new replies. More on wordpress.com
🌐 wordpress.com
December 2, 2021
Coding a URL to open in a new tab?
When asking a question, please ensure you've included a link to the document or a copy of your code on a service such as JSFiddle , JSBin , or CodePen . I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns. More on reddit.com
🌐 r/HTML
5
3
January 2, 2023
People also ask

How do I make my HTML link open in a new tab?
Use the target="_blank" attribute in the anchor tag along with rel="noopener noreferrer" for security.
🌐
dhiwise.com
dhiwise.com › post › html-open-link-in-new-tab-improve-user-navigation
How to Open Links in a New Tab Safely in HTML
What is target="_blank" in HTML?
It instructs the browser to open the link in a new tab or new window.
🌐
dhiwise.com
dhiwise.com › post › html-open-link-in-new-tab-improve-user-navigation
How to Open Links in a New Tab Safely in HTML
Should I use rel="noopener noreferrer"?
Yes, to prevent security vulnerabilities like tabnabbing and to avoid sending referrer information.
🌐
dhiwise.com
dhiwise.com › post › html-open-link-in-new-tab-improve-user-navigation
How to Open Links in a New Tab Safely in HTML
🌐
CoreUI
coreui.io › blog › how-to-open-link-in-a-new-tab-in-html
How to Open Link in a New Tab in HTML? · CoreUI
February 26, 2025 - Explore your browser’s settings to see how it handles open link actions by default. Experiment with dynamically changing the target="_blank" using JavaScript if you want to create or insert conditions under which links open in a new tab.
🌐
Educative
educative.io › answers › how-to-open-a-link-in-a-new-tab-with-html-and-javascript
How to open a link in a new tab with HTML and JavaScript
The value of the target attribute _blank opens the link in a new tab. The text Educative is the link text between the opening <a> tag and the closing </a> tag. Enhance your understanding of HTML links with the help of this project, "Creating ...
🌐
freeCodeCamp
freecodecamp.org › news › how-to-use-html-to-open-link-in-new-tab
How to Use HTML to Open a Link in a New Tab
September 8, 2020 - If you click on the link above, the browser will open the link in the current window or tab. This is the default behavior in every browser. To open a link in a new tab, we'll need to look at some of the other attributes of the anchor element's other attributes.
Find elsewhere
🌐
DhiWise
dhiwise.com › post › html-open-link-in-new-tab-improve-user-navigation
How to Open Links in a New Tab Safely in HTML
September 12, 2025 - This guide explains the rel="noopener noreferrer" security practice, preventing tabnabbing, with practical HTML and JavaScript examples to improve user experience without risking vulnerabilities.
🌐
Squarespace Forum
forum.squarespace.com › home › customize with code › force all external links into a new tab?
Force all external links into a new tab? - Customize with code - Squarespace Forum
January 12, 2014 - To make them universal just place this code in header injection on all pages you wish all links to be forced to open in a new tab: <base target="_blank"/> Works really well.
🌐
GeeksforGeeks
geeksforgeeks.org › html › how-to-open-a-hyperlink-in-another-window-or-tab-in-html
How to Open a Hyperlink in Another Window or Tab in HTML? - GeeksforGeeks
November 23, 2024 - In HTML, this can be easily achieved using the 'target' attribute of the anchor ('<a>') tag. By setting 'target="_blank"', you instruct the browser to open the linked document in a new tab or window.
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › how-to-open-url-in-new-tab-using-javascript
How to Open URL in New Tab using JavaScript? - GeeksforGeeks
<html> <head> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; font-family: Arial, sans-serif; } button { padding: 10px 20px; font-size: 16px; cursor: pointer; } </style> </head> <body> <p>Click the button to open <b>GeeksforGeeks</b> in a new tab:</p> <button onclick="NewTab()">Open GeeksforGeeks</button> <script> function NewTab() { window.open("https://www.geeksforgeeks.org////", "_blank"); } </script> </body> </html> ... When clicked, it runs the NewTab() function. window.open("https://www.geeksforgeeks.org////", "_blank"); opens the GeeksforGeeks website in a new tab. Here are the applications of opening URLs in new tabs: External Links: When linking to external websites, it’s best to open them in a new tab to keep users on your site.
Published   August 21, 2025
🌐
Equalize Digital
equalizedigital.com › home › link opens new window or tab
Link Opens New Window or Tab
August 28, 2025 - A link that opens a new window ... new windows or tabs include target="_blank" in the <a> tag, which tells the browser to open the new window or tab rather than following the link in the current tab.
🌐
Codedamn
codedamn.com › news › frontend
Using HTML to open link in new tab
June 6, 2023 - If a tab or window with that name already exists, the link will open in that tab or window. In conclusion, using the target attribute in HTML is a simple and effective way to open links in new tabs, providing a better user experience for your ...
🌐
freeCodeCamp
freecodecamp.org › news › how-to-open-a-link-in-a-new-tab
How to Open a Link in a New Tab – HTML target blank Attribute Explained
May 31, 2022 - In this example, we are linking to the DevDocs documentation, so the user can stay on their current page and look up a reference on a new tab. You can use the target="_blank" attribute if you want your users to click on a link that opens up ...
🌐
Quora
quora.com › How-do-you-create-a-hyperlink-that-opens-in-a-new-tab
How to create a hyperlink that opens in a new tab - Quora
Answer: to let your given link open in a new tab you have to use the target:”_blank”; tag within anchor tag as written below:- [code]Click Here [/code]There are more ways of using [code ]target:[/code] * [code ]_blank[/code]: Opens...
🌐
Delft Stack
delftstack.com › home › howto › html › html open link in new tab
How to Open Link in New Tab in HTML | Delft Stack
March 11, 2025 - One of the simplest ways to open a link in a new tab in HTML is by using the target attribute within the anchor (<a>) tag.
🌐
Reddit
reddit.com › r/html › coding a url to open in a new tab?
r/HTML on Reddit: Coding a URL to open in a new tab?
January 2, 2023 -

Hi all, I'm hoping this is the right place for this, but is there a way to something to a URL so that when that URL is linked or embedded somewhere, the link will automatically take them to a new tab?

I am trying to set a link in our top navigation menu on our WordPress site that uses Avada, and I don't have the option to just tell it to open that link in a new tab as a setting. So I was hoping I could set it to do so just by the link itself, but I'm not familiar enough with that to know if it is possible or not. Looking it up myself has only yielded results for "target=_blank" when doing hardcoding on the back end-something that isn't an option with the set up we have (or I'm just not aware of how to go about it).

Any help or advice is appreciated!

🌐
W3Things
w3things.com › blog › open-external-links-in-new-tab-javascript
Open External Links in a New Tab Using JavaScript - W3Things
December 6, 2023 - Beginners' tutorial on how to open external links in a new tab or browser window using pure JavaScript code.