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
Discussions

How to Open Page in New Tab
Need to add “target=“_blank” after your href attribute More on reddit.com
🌐 r/HTML
4
1
November 21, 2024
How to open Custom HTML Link to open in new tab | WordPress.com Forums
You can make a HTML link open in a new tab by adding the target=”_blank” attribute. You should insert this after the link address. Here is an example link that would open the WordPress.com homepage in a new tab: 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
December 25, 2022
Is there a way to open links in a new tab without switching to that tab?
middle click More on reddit.com
🌐 r/Enhancement
28
14
April 9, 2012
People also ask

How do I open a link in a new tab in HTML?
When wondering how to open a link in a new tab in HTML, the recommended solution is to use the combination of target="_blank" and rel="noopener noreferrer" for reliable performance across browsers.
🌐
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
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
🌐
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 - href attribute specifies: Tells your HTML parser exactly which linked URL to fetch. rel attribute: Helps define the relationship between the original page and the newly opened tab, often used for security measures. When you want to open the linked document in a new tab, you typically use target="_blank". This target value instructs the browser to create a new page, also known as a new tab or window. For example:
🌐
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.
🌐
Computer Hope
computerhope.com › issues › ch000050.htm
How to Create a Link That Opens a New Web Page Window or Tab
1 month ago - Learn how to create HTML links that open in new windows or tabs by using the target=_blank attribute for improved user navigation on your web page or site.
Find elsewhere
🌐
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.
🌐
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 - In this example, a button is created that, when clicked, triggers a JavaScript function. This function uses window.open() to open the specified URL in a new tab. The second parameter, "_blank", ensures that the link opens in a new tab rather than the current one.
🌐
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.
🌐
RapidTables
rapidtables.com › web › html › link › html-link-new-window.html
HTML link in a new window
In order to open a link in a new window, add Javascript command onclick="window.open('text-link.htm', 'name','width=600,height=400') inside the <a> tag: <a href="../html-link.htm" target="popup" onclick="window.open('../html-link.htm','name','width=600,height=400')">Open page in new window</a>
🌐
WordPress.com
wordpress.com › forums › topic › how-to-open-custom-html-link-to-open-in-new-tab
How to open Custom HTML Link to open in new tab | WordPress.com Forums
December 2, 2021 - You can make a HTML link open in a new tab by adding the target=”_blank” attribute. You should insert this after the link address. Here is an example link that would open the WordPress.com homepage in a new tab:
🌐
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
🌐
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?
December 25, 2022 -

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!

🌐
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
To make a hyperlink open in a new window or tab, you need to add a target attribute to the HTML <a> (anchor) tag. Here is an example of how to make a hyperlink open in a new window:
🌐
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 ... 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 - For example, target="codedamnWindow" will open the link in a new tab or window with the name "codedamnWindow". If a tab or window with that name already exists, the link will open in that tab or window.
🌐
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 ...
🌐
Rip Tutorial
riptutorial.com › open link in new tab/window
HTML Tutorial => Open link in new tab/window
Tables · Text Formatting · Using HTML with CSS · Void Elements · Bulk Insert · Bulk Delete · Bulk Update · Bulk Merge · <a href="example.com" target="_blank">Text Here</a> The target attribute specifies where to open the link.
🌐
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 ...