No target="_blank" allowed in HTML 4.01 Strict!?

M

metalive

Why on earth is target="_blank" not allowed in HTML 4.01 Strict
according to W3C?! How else am I supposed to set a link to open in a new
browser window?
 
D

David Dorward

metalive said:
Why on earth is target="_blank" not allowed in HTML 4.01 Strict
according to W3C?!

It does nothing to describe the semantics or structure of the document
How else am I supposed to set a link to open in a new
browser window?

In order of preference:

* Don't. Let the user decide when they want a new window.
- http://diveintoaccessibility.org/day_16_not_opening_new_windows.html
* Use Transitional
* Use JavaScript
* Use a custom DTD

Oh, and thanks for reminding me. I'm going to go and install the Single
Window extension for Firefox. (Although I wouldn't suggest that you take
its existence as an excuse to force new windows on people).
 
S

Steve Pugh

metalive said:
Why on earth is target="_blank" not allowed in HTML 4.01 Strict
according to W3C?!

Because everything to do with frames and windows has been removed. The
Strict version of HTML 4 tries to stick closer to the intended purpose
of HTML, which is marking up documents not creating presentations or
playing with the user interface.
How else am I supposed to set a link to open in a new browser window?

You're not.

Or you can use Transitional. Or you can use JavaScript. Or you create
your own DTD for "metalive's not-quite-HTML" which is Strict+target.

But why not leave it up to your users whether they open a link in the
same/a new window/tab?

Steve
 
J

Jukka K. Korpela

metalive said:
Why on earth is target="_blank" not allowed in HTML 4.01 Strict
according to W3C?!

They occasionally make good decisions.
How else am I supposed to set a link to open in
a new browser window?

By clicking on a link with the second button of the mouse and selecting
"Open in new window", or something like that.
 
S

Spartanicus

David Dorward said:
I'm going to go and install the Single
Window extension for Firefox.

You can stop target abuse with a user.js entry:
user_pref("browser.block.target_new_window", true);
 
U

Uncle Pirate

metalive said:
Why on earth is target="_blank" not allowed in HTML 4.01 Strict
according to W3C?! How else am I supposed to set a link to open in a new
browser window?

You're not. Why do you think a new window is necessary? What if your
users/viewers don't want a new window?

--
Stan McCann "Uncle Pirate" http://stanmccann.us/pirate.html
Webmaster/Computer Center Manager, NMSU at Alamogordo
Coordinator, Tularosa Basin Chapter, ABATE of NM; AMA#758681; COBB
'94 1500 Vulcan (now wrecked) :( http://motorcyclefun.org/Dcp_2068c.jpg
A zest for living must include a willingness to die. - R.A. Heinlein
 
T

Toby Inkster

metalive said:
Why on earth is target="_blank" not allowed in HTML 4.01 Strict
according to W3C?!

Because the Strict philosophy is to seperate style, content and behaviour.

Rather than lumping them all into HTML, like in Transitional, they are
split into:

content => HTML
(optional) styling => CSS
(optional) behaviour => ECMAScript (aka Javascript)

Opening a link in a new window is a deviation from normal browser
behaviour[1], so belongs in Javascript not in HTML. So, how can you add
this behaviour without hundreds of "onclick" attributes scattered about
your code?

"New-Window Links in a Standards-Compliant World"
http://www.sitepoint.com/article/standards-compliant-world

____
[1] And arguably you shouldn't do it, as such a deviation will confuse
some visitors.
 
A

Adrienne

Gazing into my crystal ball I observed metalive
Why on earth is target="_blank" not allowed in HTML 4.01 Strict
according to W3C?! How else am I supposed to set a link to open in a new
browser window?

In addition to what other said, it breaks the back button. For people like
me who use mouse gestures, the back button is greyed out in a new window,
and I rarely look up, so I gesture back a few times and then realize I
can't go back. I really hate new windows. _I_ will open a new window if I
choose to, please don't do it for me.
 
M

mscir

metalive said:
Why on earth is target="_blank" not allowed in HTML 4.01 Strict
according to W3C?! How else am I supposed to set a link to open in a new
browser window?

Javascript?

<a href="http://www.somesite.com/"
onclick="window.open(this.href,'newwin2'); return false;"
title="View The --- Website in a New Browser Window">
Visit Website</a>
 
W

Willy

Let us be serious. If a link is not opened in a new window and the content
of the link is not what the visitor expected it to be, he/she will close the
window instead of using the back button. This happens in 99% of the cases I
guess. Internet users are mostly no computer experts. Most of us in this
newsgroup know a lot more about surfing than the average internet user.
Don't create something according your benefits but instead keep your
visitors in mind.

Try to create "fool-proof" sites. Clicking by mistake on a grayed
back-button has no result. Closing by mistake a window has.

Closing the new window always bring you back to the point you came from,
even after clicking several links which gave you several new windows.
Not using "target="_blank"" makes people get lost in a web of pages.
 
B

Beauregard T. Shagnasty

Willy said:
Let us be serious.

Good Idea™.
If a link is not opened in a new window and the content of the link
is not what the visitor expected it to be, he/she will close the
window instead of using the back button. This happens in 99% of the
cases I guess.

A lot of people surf with a maximized browser. Your new window will
completely cover the existing window, and those visitors will not
notice you have opened a new one, with a broken Back button. I have
watched them; they say "Humph" and go enter google.com in the address
bar, and go surf someplace else. Some time later, when they are
finished surfing and finally close your new window, they find the
original one underneath.

There are two things that even the most noobie surfer seems to know:
how to click on an underlined link, and how to use the Back button.
Internet users are mostly no computer experts. Most of us in this
newsgroup know a lot more about surfing than the average internet
user.

...which is why many of us recommend not opening new windows.
Don't create something according your benefits but instead keep
your visitors in mind.

Exactly! said:
Try to create "fool-proof" sites. Clicking by mistake on a grayed
back-button has no result. Closing by mistake a window has.

Only if it was the first window opened...
Closing the new window always bring you back to the point you came
from, even after clicking several links which gave you several new
windows. Not using "target="_blank"" makes people get lost in a web
of pages.

Only if their Back button is not broken.
 
M

Mark Parnell

Previously in alt.html said:
You can stop target abuse with a user.js entry:
user_pref("browser.block.target_new_window", true);

Is that any different than setting it through about:config?
 
L

Lauri Raittila

Let us be serious. If a link is not opened in a new window and the content
of the link is not what the visitor expected it to be, he/she will close the
window instead of using the back button.

I doubt it very much.
This happens in 99% of the cases I guess.

Bad guess.
Internet users are mostly no computer experts.

Exactly. But there still is many of those as well.
Most of us in this
newsgroup know a lot more about surfing than the average internet user.

True. And many knows more about avarage users than you. And many know
more about surfing than you. I regularly use windows, tabs and other wasy
to keep all 10 - 50 pages I have in order (I have less than 10 pages open
maybe once a month). New windows make things hard to handle. After all,
it is not just windows, but their back histories.
Don't create something according your benefits but instead keep your
visitors in mind.

Exactly. If your assumptions wouldn't be totally incorrect, you would
understand it.

BTW, I often try to use back function myself when new pages are opened
whiout my consent. I know people that get very confused about new
windows, even if I have tried to explain it multible times. I know nobody
that likes new windows, and can't create one.
Try to create "fool-proof" sites. Clicking by mistake on a grayed
back-button has no result.
True.

Closing by mistake a window has.

Sure, at least some browsers...
Closing the new window always bring you back to the point you came from,
even after clicking several links which gave you several new windows.

Yes, but you never find the original point from that window. Especially
confucing when you advance in that new window, and reuse/close/advance in
the existing.
Not using "target="_blank"" makes people get lost in a web of pages.

Somehow I trust some other people more than you. People that have
actually done some user testing:

Jakob Nielsen:

http://www.useit.com/
http://www.useit.com/alertbox/990530.html
http://www.useit.com/alertbox/9605.html

Karl Core:

http://www.karlcore.com/articles/article.php?id=25

And general opinion:

http://www.google.com/search?&q=opening+new+windows
 
S

Spartanicus

Mark Parnell said:
Is that any different than setting it through about:config?

Dunno, I'm not really familiar with the bizarre methods required to
configure Mozilla and it's offshoots.

I thought I'd mention it because David mentioned getting an extension
which seems overkill if it's just for this purpose.
 
L

Lauri Raittila

in said:
Some time later, when they are
finished surfing and finally close your new window, they find the
original one underneath.

No, they use File > Exit and newer see it again.
There are two things that even the most noobie surfer seems to know:
how to click on an underlined link, and how to use the Back button.

Don't forget the address field. Most ner newbies use addressfield more
tahn any other feature in browser. (they copy addresses from newspapers
and magazines)
 
B

Beauregard T. Shagnasty

Lauri said:
No, they use File > Exit and newer see it again.

'Struth, I can't say I have ever watched a noobie surfer use
File>Exit. They all seem to just click on that X up there in the
corner when they are finished.
Don't forget the address field. Most ner newbies use addressfield
more tahn any other feature in browser. (they copy addresses from
newspapers and magazines)

...except for one guy I was trying to tutor via email a few months ago.
I would send him a link (as <URL:http://www.example.com/>), and he
wouldn't click it in his hotmail viewer, but would try to enter it in
some search bar of the hotmail interface. Apparently, all that did was
look through his emails. :)

"No, no! The bar at the *top* of the browser!"
 
W

Willhe

I didn't mean every link should open in a new window. In fact I only use
"target=_blank" only when necessary and that's what I wanted to say;
sometimes it IS necessary. Therefor it should be allowed to use.
If I make a site about photography I'll dont use a new window for every link
on my page. But if I provide a link to e.g. a brand of cameras, I'll use the
"target=_blank". Because the visitor of your page will maybe start exploring
the new site and probably never gets back to your page.

Much worse are pages that refresh themselves when hitting the back-button
instead of showing the previous page. That is really disgusting.
 
O

Oli Filth

Willhe said:
Much worse are pages that refresh themselves when hitting the back-button
instead of showing the previous page. That is really disgusting.

Well, occasionally *that* is necessary. e.g. on a message-board, or an
online-banking site, or web-based email site, or a site like Ebay, etc.
On all these sites, having out of date information is of no use to
anyone, and in the case of online-banking, could actually be dangerous.
 
O

Oli Filth

<SNIP my response>

Oh, sorry, I misunderstood what you were talking about! No, I agree,
those sites are truly irritating.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top