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

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
Forums / How to open Custom HTML Link to open in new tab How to open Custom HTML Link to open in new tab sumittaxali · Member · Jul 31, 2018 at 8:14 pm Copy link Add topic to favorites I am adding Custom HTML link through Custom HTML Widget on sidebar but the link is opening… More on wordpress.com
🌐 wordpress.com
December 2, 2021
html - Open link in new tab or window - Stack Overflow
Is it possible to open an a href link in a new tab instead of the same tab? Link More on stackoverflow.com
🌐 stackoverflow.com
How do I make a link open in a new tab? HTML, CSS, JS
Use target="_blank" in the link More on reddit.com
🌐 r/learnprogramming
8
1
October 20, 2023
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 - Review the CoreUI Tutorials at https://coreui.io/blog/ for more tips on structuring your html layout and tag usage. 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.
🌐
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.
🌐
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
🌐
Reddit
reddit.com › r/learnprogramming › how do i make a link open in a new tab? html, css, js
r/learnprogramming on Reddit: How do I make a link open in a new tab? HTML, CSS, JS
October 20, 2023 -

I have a button which has a link to a different website and when I click it, it redirects to the site but I want it to go to a different tab so that you can go back to it. I'm pretty sure it's possible since I see other websites do it all the time.

🌐
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>
🌐
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 30, 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!

🌐
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.
🌐
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-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 ...
🌐
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.
🌐
Medium
medium.com › geekculture › get-links-to-open-in-a-new-tab-84bbbbeb6ab0
Get Links to Open in a New Tab. Use HTML ‘target’ attribute to get the… | by Jonelle Noelani Yacapin | Geek Culture | Medium
June 2, 2021 - Use HTML ‘target’ attribute to get the response from clicking a link or submitting a form to display in a separate tab or window.
🌐
Vu
vucollaboratehelp.vu.edu.au › help-guides › content › html-editor › 785-adding-a-link-to-open-in-a-new-tab
Create - Adding a link to open in a new tab
However, for any links that open in the same tab, you can modify them through Quicklink Properties. 1. Place your cursor on the existing link in your HTML page, indicated by blue highlighted. 2. Then, select Edit Link (pencil icon) from the option. 3. Under Open in, click on the New window, then select Apply.
🌐
DEV Community
dev.to › hardiquedasore › secure-way-to-open-an-external-link-in-a-new-tab-or-window-41m9
Secure way to open an external link in a new tab or window - DEV Community
January 11, 2023 - In order to open a link from your website, we need to use the anchor tag <a> in HTML. Inside the anchor tag the URL is added to the href parameter. <a href="https://www.google.com/" >Google</a> Now to open the link in a separate tab, we add ...