Specifying targets in strict documents

For general web development questions that are not specifically related to CSS HTML Validator. This includes (but is not limited to) general HTML, CSS, Accessibility, JavaScript, and SEO questions.
John Zeman
Rank III - Intermediate
Posts: 54
Joined: Sat Dec 11, 2004 2:17 pm

Specifying targets in strict documents

Post by John Zeman »

This is not directly related to CSE but since CSE alerted me to the problem, and since I have not had any luck so far finding the answer by searching the internet, I thought I'd post my question here in case anyone knows the answer.

Recently I made the decision to write all my new html documents in strict mode. No problems doing so until I added a

target="_blank"

attribute to an anchor element. CSE (and every other validator I've tried) tells me targets are not allowed in strict documents. Ok that's fine, but what is the equivalent way of specifying a target then? It's not a frames site, all I want to do is to open a link to another web site in a new window in strict mode.

If anyone has the answer, I'd appreciate hearing it.

Thanks,

John
John Zeman
Rank III - Intermediate
Posts: 54
Joined: Sat Dec 11, 2004 2:17 pm

Post by John Zeman »

Never mind, I finally found the answer here:

http://www.sitepoint.com/article/standa ... iant-world

John
Dwight_Stegall
Rank 0 - Newcomer
Posts: 6
Joined: Thu Jan 15, 2009 7:52 pm
Location: East Moline, Illinois

Post by Dwight_Stegall »

To me that whole article is ridiculous. Target="_blank" cannot be turned off but Javascript's window.open can. Why use something that can be disabled? Besides doing it the JavaScript way takes way more code and slows your page loading down. Surely they can find better ways to waste our time?
User avatar
Lou
Rank V - Professional
Posts: 297
Joined: Fri Jul 29, 2005 5:55 pm
Location: CO

Re: Specifying targets in strict documents

Post by Lou »

Dwight_Stegall wrote:To me that whole article is...
Yes, but do you have an other solution to the original 2005 post?
John Zeman wrote:Recently I made the decision to write all my new html documents in strict mode. No problems doing so until I added a

target="_blank"

attribute to an anchor element.
Lou
Say what you will about Sisyphus. He always has work.
User avatar
MikeGale
Rank VI - Professional
Posts: 726
Joined: Mon Dec 13, 2004 1:50 pm
Location: Tannhauser Gate

Post by MikeGale »

Answer: Don't use strict.
User avatar
Lou
Rank V - Professional
Posts: 297
Joined: Fri Jul 29, 2005 5:55 pm
Location: CO

Post by Lou »

Yes of course. But not much of an intellectual exercise.
Lou
Say what you will about Sisyphus. He always has work.