Open Link in New Tab - How-To Guide

  • Thread starter Thread starter weitao
  • Start date Start date
  • Tags Tags
    Link
Click For Summary

Discussion Overview

The discussion revolves around how to open links in a new tab using HTML and browser settings, exploring the interaction between code and browser behavior. It includes technical explanations and user experiences related to different browsers.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • Some participants inquire about HTML or code methods to open links in a new tab without using the right-click context menu.
  • One participant mentions that the behavior of opening links in new tabs or windows is determined by the user's browser configuration, particularly with the use of target="_blank".
  • Another participant describes alternative methods for opening links in new tabs using mouse functionalities, such as middle-clicking or using both click buttons simultaneously.
  • There is a claim that while target="_blank" can be used in HTML, the actual behavior (new tab vs. new window) is ultimately decided by the browser settings.
  • One participant argues that the HTML code can dictate the opening method, but acknowledges that browser settings can override this.
  • A participant shares an observation about Internet Explorer 9's behavior with target="_blank", noting differences based on whether the link's server matches the parent page's server.
  • Another participant questions if the method of opening links discussed involves using the ctrl+click combination.

Areas of Agreement / Disagreement

Participants express differing views on the extent to which HTML code can control link behavior versus the role of browser settings. There is no consensus on a definitive method to ensure links open in new tabs across all browsers.

Contextual Notes

Limitations include the variability of browser settings and support for features like tabs, which can affect how links are opened. The discussion does not resolve the technical nuances of browser behavior.

weitao
Messages
32
Reaction score
0
If there have html or any code to open a link into other tab( not new window and with right-click of the link)?
 
Technology news on Phys.org
Nothing that I know of. I've heard about it being in CSS3 but I'm not sure. Right now it's up to the user's browser configuration to decide how to open up links that have target="_blank".
 
The browser decides whether it is a pop up, new window or new tab.

If you're sick of right clicking, my mouse let's me use the middle scroll wheel, if I use that on a link it opens it in a new tab or on my trackball mouse I can use the right and left click buttons together (click the link with both at the same time) and it opens a new tab.
 
no, you can assign target="_blank" within the link html code. If your browser doesn't support tabs, it will open within a new window. The browser doesn't decide, it's a variable that you can set in the code.

Code:
<a href="www.blahblah.com/whatever" target="_blank">link text<a />

This is the proper way of using the html code and it's also more future proof for xhtml.
 
Last edited:
Setting new window or simply open the link may be done in the code, but the choice of new tab or new window is done in the browser.

They are two separate issues, don't confuse them.

You can dictate within the browser settings how to handle new windows (tab or new window), so yes, the browser does decide.

For example, firefox supports tabs but I can disable it so all links such as that you posted above will open in a new window.

There is no code that can force a tab unless the browser is already set to do so.
 
That's obvious though, but the code does do the job with the right permissions, saying that the browser decides with your example would be like asking how to open a webpage in a new tab with IE6. IE6 doesn't support tabbed webpages, and therefore it can't be done. But the html code target="_blank" is legit.

I know more about computers and webmaster jobs than I do in physics lol, but right now I need to learn physics.
 
I have noticed that in Internet Explorer 9 target="_blank" opens the url in a new tab when tabs are supported by the browser but no when the server in the link is different from that of the parent page containing the link. E.g. when the link is part of the page www.somepagename.com and the link refers to www.answers.com the link opens up in a new tab, but opens up in a new window when wiki.answers.com. Google Chrome does not seem to make this difference.
 
Last edited by a moderator:
do you mean ctrl+click?
 

Similar threads

Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
7
Views
4K
  • · Replies 16 ·
Replies
16
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
4
Views
4K