Jump to content

HTML tag to open a window in new tab


paragkalra

Recommended Posts

Hey folks,

 

I am designing my own website. I want the tabs to open in new window with control remaining with the existing page.

 

I tried using

target="_blank"
. The link is getting opened in the new tab but the control is being transfered to the new page where as I want it to stay with the parent page.

 

I know to an extent it depends on the web-browser but still I want to know the best way to do so.

Link to post
Share on other sites

Target is now deprecated, for the very reason that you shouldn't be taking control out of the hands of your users. If they want to open a new window/tab, they can do it themselves.

Link to post
Share on other sites

I am sorry for making a slight mistake in my post...I actually want that all the URLS/Hyperlinks present on the index page of my website should by default either open in new window or in new tab...i.e. I want my index page to always remain open on the browser...

Link to post
Share on other sites
  • 3 weeks later...

it's not really your place to decide. but i get it.  in a page im building, my links are div containers, so you cant really right click and go down to open in new window/ tab, but this might work (emphasis on might):

 

* { 
target-new: tab ! important 
}

 

 

i haven't gotten it to work yet, but i'm probably just missing something.

 

it's "theoretically" supposed to work if your browser knows what the hell you're talking about first.

 

"tabs? dude, i got tabs?!"

 

 

- good luck.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.