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:

  • MDN | HTML element <a> | attribute target
  • About rel=noopener
  • Opens External Anchors Using rel="noopener"
Answer from Nathan on Stack Overflow
🌐
W3Schools
w3schools.com › jsref › met_win_open.asp
Window open() Method
window.open("http://www.google.com/"); window.open("https://www.w3schools.com/"); Try it Yourself » · Open a new window.
🌐
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
🌐
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 / tab, add target="_blank" inside the <a> tag: <a href="../html-link.htm" target="_blank">Open page in new window</a>
🌐
W3Docs
w3docs.com › html
How to Open Hyperlink in a New Window
To open a link in a new window, you need to add the target="_blank" attribute to your anchor link, like the following. <!DOCTYPE html> <html> <head> <title>Title of the document</title> </head> <body> <h1>Hyperlink Example</h1> <p> This <a ...
🌐
W3Schools
w3schools.com › html › html_links.asp
HTML Links Hyperlinks
HTML links are hyperlinks. You can click on a link and jump to another document. When you move the mouse over a link, the mouse arrow will turn into a little hand.
🌐
HTML AM
html.am › html-codes › links › open-link-in-new-window.cfm
Open Link in New Window
The quickest way to open a link in a new window is to add target="_blank" to your <a> tag (which of course, is the HTML tag to create a link).
Find elsewhere
🌐
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 - You just need an anchor (<a>) element with three important attributes: The href attribute set to the URL of the page you want to link to, The target attribute set to _blank, which tells the browser to open the link in a new tab/window, depending ...
🌐
Quackit
quackit.com › html › codes › html_open_link_in_new_window.cfm
HTML Open Link in New Window
You can use the HTML code on this page to force a link to open in a new window.
🌐
W3Schools
w3schools.com › cssref › css3_pr_target-new.php
CSS target-new property
The target-new property specifies whether new destination links should open in a new window or in a new tab of an existing window. Note: The target-new property only works if the target-name property creates a new tab or a new window.
🌐
Atlassian
developer.atlassian.com › server › confluence › how-do-i-make-my-attachments-open-in-a-new-window-or-a-tab
How do I make my attachments open in a new window or a tab?
add the parameter TARGET = "_blank" to the <a href> HTML tag, which will cause the URL specified in the href parameter to open in a new window or a new tag depending upon the option set in the browser.
🌐
CSS-Tricks
css-tricks.com › snippets › html › open-link-in-a-new-window
Open Link in a New Window | CSS-Tricks
May 14, 2013 - Here’s more people with the same issue stackoverflow link ... has usually always worked on every browser. target=”new” not so much however but target=”_new” usually does. ... Hello HarBek… You can use target=”_anything” ….This is not complusory to use “new” after underscore….because this is not a keyword..Any browser can take it as command to open new window.. :) ... This topic is missing something important. Is there a way using CSS and HTML to open internal links in same window and external links in new window?
🌐
Dummies
dummies.com › article › technology › programming-web-design › html5 › how-to-open-links-in-new-windows-or-tabs-with-html5-161039
How to Open Links in New Windows or Tabs with HTML5 | dummies
July 2, 2025 - The simple addition of the target attribute to an anchor element opens that link in a new browser window (or tab) instead of opening it in the current window: <p>The <a href="http://www.w3.org" target="_blank">World Wide Web Consortium</a> is the standards body that oversees the ongoing development of the XHTML specification.</p> When you give a target attribute a _blank value...
🌐
Educative
educative.io › answers › how-to-open-hyperlinks-in-a-new-window-in-html
How to open hyperlinks in a new window in HTML
By default, it opens the target URL in the same tab. This default behavior can be changed in one of two ways. The simplest way is using the target attribute. The '_blank' tells the browser to use a new window or tab.