Open Link in New Tab - How-To Guide

  • Thread starter Thread starter weitao
  • Start date Start date
  • Tags Tags
    Link
AI Thread Summary
The discussion centers on how to open links in a new tab using HTML and browser settings. It clarifies that while the HTML attribute target="_blank" can be used to suggest opening a link in a new tab, the actual behavior depends on the user's browser configuration. Users can customize their browser settings to dictate whether links open in new tabs or new windows. The conversation highlights that some browsers, like Internet Explorer, may handle links differently based on the source of the link, while others like Google Chrome do not exhibit this behavior. Additionally, alternative methods for opening links in new tabs, such as using the middle mouse button or specific mouse clicks, are mentioned. Overall, the consensus is that while HTML can indicate a preference for new tabs, the final decision lies with the browser's settings and capabilities.
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

Back
Top