target attribute

liunx

Guest
When I validate my page for XHTML strict I get the error<br />
<br />
no attribute "target"<br />
<br />
What is the correct way to open a new window from a link, I am using target="_blank" at the moment.<!--content-->You don't open new windows from links. It is against accessibility recommendations to popup new windows, which (I presume) is why the target attribute has been removed.<br />
<br />
Adam<!--content-->Oh ok, nevermind. Ill have to change it some time.<br />
<br />
Thanks.<!--content-->What do you mean? I use target="_blank" and I have never seen it being invalid. What if you are making a gallery or something, its nifty to open the pictures in new windows? How would opening in a new window be a bad thing?<!--content-->What doctype do you use?<br />
<br />
I currently use the XHTML Strict doctype and its probably that, thats causing my problem.<!--content-->If you're using js on your site then you may as well go the whole nine yards and use:<br />
window.open("","","");<!--content-->I use <br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><br />
and<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><br />
<br />
But I dont have any target="_blank" attributes on the xhtml ones yet because those are just practice pages for css. But how the heck would the target attribute be bad? Also about the java script, no, I use java script as little as possible I really dont enjoy using it, I feel its downsides outweigh its benifits.<!--content-->personaly, i stick with xhtml transitional soley to use the target attribute. its often requested of me to have links to various other sites, and to have them show up in a subframe on the linking site. i push for the use of target=_blank instead -- the much lesser of two evils from my point of view. and i dont want a function filing through all anchors on every page for something i find so silly. so i stick with xhtml transitional, otherwise i would be xhtml1.1 valid<br />
<br />
the w3c is dead set on making the dom another manditory recommendation, which is fine with me if everyone else can manage (like those used car salesmen that seem to double as programmers of readers-for-the-blind). xhtml2 expects javascript to provide access to the target attribute like strict and 1.1 do<!--content-->
 
Back
Top