That will open a new window, not tab (with JavaScript, but quite laconically):

<a href="print.html"  
    onclick="window.open('print.html', 
                         'newwindow', 
                         'width=300,height=250'); 
              return false;"
 >Print</a>
Answer from Ievgen on Stack Overflow
🌐
OutSystems
outsystems.com › forums › discussion › 65977 › open-link-in-a-new-window-not-tab
Open link in a new window (NOT TAB) | OutSystems
I have a link on my page, and I want it to open it in a new window (not a new tab) when clicking it. Currently, this link points to a new screen action, and in this new screen action I have a RunJavaScript server action with the following script: · However, it still open the link in new tab ...
Discussions

I want Chrome to open each ink in a new window, not a new tab. - Google Chrome Community
Skip to main content · Google Chrome Help · Sign in · Google Help · Help Center · Community · Google Chrome · Terms of Service · Submit feedback · Send feedback on More on support.google.com
🌐 support.google.com
September 28, 2021
How to open a link in new window(not in new tab) in Html/css
To open link in new tab you do this: open in new tab But how can I made it open in a new window? So, help me out to overcome this problem. More on stackoverflow.com
🌐 stackoverflow.com
May 25, 2017
hyperlink - How to open link in a new tab in HTML? - Stack Overflow
I'm working on an HTML project, and I can't find out how to open a link in a new tab without JavaScript. I already know that opens the More on stackoverflow.com
🌐 stackoverflow.com
Open external links in new window, not tab?
Hi there, when I click on a link in an external application, such as Mail or OneNote, Edge opens it as a new tab in the frontmost window. How do I get it to open in a new Edge window instead? Thanks for any hints! More on learn.microsoft.com
🌐 learn.microsoft.com
3
9
January 17, 2024
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › API › Window › open
Window: open() method - Web APIs | MDN
The open() method of the Window interface loads a specified resource into a new or existing browsing context (that is, a tab, a window, or an iframe) under a specified name.
🌐
Google Support
support.google.com › chrome › thread › 128260946 › i-want-chrome-to-open-each-ink-in-a-new-window-not-a-new-tab
I want Chrome to open each ink in a new window, not a new tab. - Google Chrome Community
September 28, 2021 - Skip to main content · Google Chrome Help · Sign in · Google Help · Help Center · Community · Google Chrome · Terms of Service · Submit feedback · Send feedback on
🌐
Educative
educative.io › answers › how-to-open-hyperlinks-in-a-new-window-in-html
How to open hyperlinks in a new window in HTML
However, most browsers default to using a new tab instead of a new window. ... In JavaScript, the window object represents the browser window. The open() method of the window object can be used to create a new window. ... On line 6, window.open is used with the onclick attribute within the <a> tag. Parameters passed to window.open are as follows: this.href: It refers to href , the URL already specified in <a> tag. ... Lastly, return false; makes sure the original window is not redirected.
🌐
W3Docs
w3docs.com › html
How to Open Hyperlink in a New Window
There is another way of opening a hyperlink in a new tab by using the JavaScript window.open function with the onclick event attribute like this: ... <!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> .link:hover { ...
Find elsewhere
🌐
CSS-Tricks
css-tricks.com › snippets › html › open-link-in-a-new-window
Open Link in a New Window | CSS-Tricks
May 14, 2013 - Because if I want to open link in new window, jsut press shift+mouse key. Or middle button (to open in new tab). ... I’d say it’s the best practice to use target=”_blank”, because it simply works.
Top answer
1 of 7
1

i think yo want to open a completely new window on clicking a link.in other words u want a popup.try the following code.

<script language="javascript" type="text/javascript">
function popitup(url) {
newwindow=window.open(url,'name','height=200,width=150');
if (window.focus) {newwindow.focus()}
return false;
   }

<a href="popupex.html" onclick="return popitup('popupex.html')">Link to popup</a>
2 of 7
1

This works in theory but it will depend on the preferences set in the browser. Now a days you can fake a new window by using div's and Layers. Is there anyway to implement a layer that hides what is behind it.

JavaScript:

function getElementsByClass( searchClass, domNode, tagName) { 
    if (domNode == null) domNode = document;
    if (tagName == null) tagName = '*';
    var el = new Array();
    var tags = domNode.getElementsByTagName(tagName);
    var tcl = " "+searchClass+" ";
    for(i=0,j=0; i<tags.length; i++) { 
    var test = " " + tags[i].className + " ";
    if (test.indexOf(tcl) != -1) 
        el[j++] = tags[i];
} 
return el;
}
// paste getElementsByClass function (see above) here 

function showtab(tabname) 
{ 
// hide every element with class 'box1'  
var tabs = getElementsByClass('box1');
for(i=0; i<tabs.length; i++) {
    tabs[i].style.display = 'none';
    //tabs[i].style.visibility = 'hidden';
}
// hide every element with class 'box1'      
var tabs2 = getElementsByClass('myStyle');
for(i=0; i<tabs2.length; i++) {
    tabs2[i].style.display = 'none';
    //tabs2[i].style.visibility = 'hidden';
}

document.getElementById(tabname).style.display='block';
//document.getElementById(tabname).style.visibility='visible';
// show element with given tabname 
} 

function showsubtab(tabname)
{
//hide every element with class 'myStyle'
var tabs = getElementsByClass('myStyle');
for(i=0; i<tabs.length; i++) {
    tabs[i].style.display = 'none';
    //tabs[i].style.visibility = 'hidden';
}
document.getElementById(tabname).style.display='block';
//document.getElementById(tabname).style.visibility='visible';
}

if (window.addEventListener) { // Mozilla, Netscape, Firefox
window.addEventListener('load', showmessage, false);
} else if (window.attachEvent) { // IE
window.attachEvent('onload', showmessage);
}

function showmessage() {
document.getElementById('box').style.display='block';
document.getElementById('div1').style.backgroundColor='grey';
document.getElementById('div1').style.opacity = 0.2;
document.documentElement.style.overflow = "hidden"; //firefox, chrome
document.body.scroll = "no"; // ie only
var bodyLayer = document.getElementById('div1');
DisableLinks(bodyLayer);
}
function hidemessage() {
document.getElementById('box').style.display='none';
document.getElementById('div1').style.backgroundColor='transparent';
document.getElementById('div1').style.opacity = 1.0;
document.documentElement.style.overflow = 'auto';  // firefox, chrome
    document.body.scroll = "yes"; // ie only
var bodyLayer = document.getElementById('div1');
EnableLinks(bodyLayer);
}

function DisableLinks(dom) {
if(undefined != dom){
    links=dom.getElementsByTagName('A');
} else {
    links=document.getElementsByTagName('A');
}

for(var i=0; i<links.length; i++) {
    links[i].style.pointerEvents="none";
}
}

function EnableLinks(dom) {
if(undefined != dom){
    links=dom.getElementsByTagName('A');
} else {
    links=document.getElementsByTagName('A');
}

for(var i=0; i<links.length; i++) {
    links[i].style.pointerEvents="auto";
}
}

HTML

<div id="box">
<section id="close">
<section id="title">Important Site Message</section>
<section id="button"><a href="#" onClick="hidemessage();">[X]</a>&nbsp;</section>
</section>
<!--Body of the Message-->
</div>

CSS #box {position: absolute; top: 50%; left: 50%; height: 15.625em; width: 25em; background-color:#FFF; margin-top: -7.8125em; margin-left: -12.5em; display: none; overflow: auto; border-color:#000; border-style:ridge; border-width:medium; z-index: 3; color: #000;} #close {border-bottom: inset thick #CCC; background-color: #000; width: inherit; height: 1.2em; color: #FFF; position: fixed;} #close a:visited {color: #FFF;} #close a:hover {color: red; text-decoration:none;} #close #title {text-align: center; font-weight:bold; width: 90%; padding: 1 1 1 1; clear: left; float: left; background-color:#000; color:#FFF;} #close #button {text-align: right; padding: 1 1 1 1; width: 10%; clear: right; float: right; background-color: #000; color: #FFF;}

🌐
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
🌐
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 ...
🌐
HTML.com
html.com › attributes › a-target
How To Use The <a> To Make Links & Open Them Where You Want! »
January 11, 2019 - The target attribute specifies where the linked document will open when the link is clicked. The default is the current window. If target="_blank", the linked document will open in a new tab or (on older browsers) a new window.
🌐
Super User
superuser.com › questions › 368397 › getting-chrome-to-open-an-html-file-in-a-new-window
Getting Chrome to open an `.html` file in a new window - Super User
December 15, 2011 - My only thought would be to create ... icon set as chrome? ... Control Panel -> Folder Options -> File Types -> HTML -> Advanced -> open -> Edit -> Replace -- with --new-window -> Ok all the way back....
🌐
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>
🌐
tutorialpedia
tutorialpedia.org › blog › how-can-i-make-a-html-a-href-hyperlink-open-a-new-window
How to Make HTML a href Hyperlink Open in a New Window: Fixing Links That Don't Open New Tabs — tutorialpedia.org
The return false prevents the default href behavior, and window.open(..., '_blank') ensures a new tab. Some CSS frameworks (e.g., Bootstrap) or custom stylesheets may include JavaScript that dynamically modifies link targets.