Where’s my target=”_tab”?
Posted by 76design on December 21st, 2006
I’ve been using the target=”_blank” attribute in my «a» tags since before my first Tea Party fansite ever graced the hallowed pages of Geocities. Fast forward to what will soon be 2007 and we now have the ability to have multiple tabs instead of a bunch of floating windows all over your desktop. So when will we be able to tell HTML links to open in a new tab as opposed to a new window?
This “innovation” (the kind of innovation where you wonder why it wasn’t that way the whole time) has finally been adopted by the big M (only four years later, I might add), so we can officially call it a “standard”. Now it’s time to ask ourselves: When will HTML catch up to current browser technology?
There are still uses for the “new window” link, so I wouldn’t want to eliminate it entirely. I think it should be up to the designer/programmer to decide which link is appropriate; either link in the current window, open a new tab or open a new window. It would be one more level of functionality that could be used to better serve the website’s needs.
There are a TON of uses for this “tab link” idea. For on-line orders, you could have your regular shopping tunnel in the current window, but Terms and Conditions could be viewed in a separate tab, as opposed to having a whole new window pop up, possibly confusing the user.
Someone needs to give our old pal Tim a call and ask him when we can have a link with target=”_tab” in it!













December 29th, 2006 » 3:01 pm
Travis,
Great idea! Why not do it yourself? I’m sure it would catch on like wildfire.
January 1st, 2007 » 12:03 pm
It is so funny that you should write about this as I have thought about the same exact thing while working on a website recently. You mentioned in your article that “The Big ‘M’” has made it their standard. Don’t forget that Opera is the same way.
I am a Firefox user myself, and wanted to note that while you cannot open a link in a new tab in the HTML code, with the advent of Firefox 2.0, the browser now has the ability to force all “target=”_new”" links to open in a new tab instead. I know this because I use it myself so that I can keep everything in one nice, neat window.
Hopefully though, while designing HTML 5, they will take advancements like tabbed windows into consideration and provide the necessary, needed support.
Best regards and Happy New year!!
January 4th, 2007 » 11:52 am
Sorry guys. But the way XHTML is going “target=” attributes are no longer supported. I guess the philosophy is that (X)HTML is there to handle how the document is displayed, not to control the behaviour of the browser (or “user agent” as they call it).
January 10th, 2007 » 12:14 pm
I agree with Francois. Target=”" attributes are no longer support and can be very frustrating for users. Users can do this themselves if they want it.
Often it’s used so that the user “doesn’t leave the web page”. But since a new window is opening they’re attention is leaving, so for all intensive purposes they are leaving.
Add to that if you’re using a strict doc type you can’t use target attributes at all.
So here’s another option.
Use the rel=”" attribute.
and then:
$(document).ready(function() {
$(”a[@rel='external']“).addClass(”external”).
.click(function() { window.open($(this).href); return false; });
});
This will add an “external” class to the link, which you can style and add visual ques that the link will open a new window.
But I would strongly advise against forcing links to open in new windows or tabs. Any kind of unanticipated action is bad usability.