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

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 11, 2014
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
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 4, 2023
🌐
W3Schools
w3schools.com › html › html_links.asp
HTML Links Hyperlinks
You can read more about file paths in the chapter HTML File Paths. ... Use the mailto: scheme inside the href attribute to create a link that opens the user's email program
🌐
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. ... Now to open the link in a separate tab, we add target="_blank" but this makes the website ...
🌐
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>
🌐
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 11, 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.
Find elsewhere
🌐
Equalize Digital
equalizedigital.com › home › link opens new window or tab
Opening Links in New Windows or Tabs: Accessibility Guidance
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.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Reference › Elements › a
<a>: The Anchor element - HTML | MDN
Links that open in a new tab/window via target="_blank", or links that point to a download file should indicate what will happen when the link is followed.
🌐
Computer Hope
computerhope.com › issues › ch000050.htm
How to Create a Link That Opens a New Web Page Window or Tab
3 weeks 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.
🌐
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.
🌐
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-make-a-link-open-in-a-new-tab-CSS
How to make a link open in a new tab CSS - Quora
Answer (1 of 5): I don’t think you can do it with CSS. However you can with HTML by setting the ‘target’ attribute to ‘_blank’. Example below: [code]Link [/code]
🌐
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 4, 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!

🌐
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.
🌐
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.