homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

Where to Open the Action URL since target attribute is deprecated

 6:45 pm on Oct 10, 2010 (gmt 0)


Please look at the following reference:
[w3schools.com ]

If the target attribute of <form> is deprecated, what's the right way to do it?

Thanks in advance!
Rain Lover



 7:00 pm on Oct 10, 2010 (gmt 0)

There might be some other way - but with HTML5 the target attribute is legitimate and the browser support for it is certainly fine.

If you need the page to validate, you can just change the DTD to <!DOCTYPE html> and you are future-proof, as far as I can see - unless your page depends on quirks mode, that is. The HTML5 DTD always triggers standards mode.


 7:17 pm on Oct 10, 2010 (gmt 0)

the target attribute of <form> is deprecated

Well, it has been "undeprecated" (which is not a word, but describes best the situation!), so there is no real issue using target on a form tag. Don't hesitate to use it if you need it, browser support is universal.

It won't validate in HTML 4.01 Strict (or XHTML 1.0 Strict), but it will validate as HTML 4.01 Transitional (either in quirks or standards mode) as well as with HTML5.


 3:49 pm on Oct 12, 2010 (gmt 0)

Agreed, if you're not using XHTML features, a different doctype would likely better describe the content anyway. But if you absolutely must use an XHTML doctype, you can use Javascript as a substitute for the target attribute in forms and anchors/hyperlinks. It leads to another compromise, it's now Javascript dependent, but will validate.


 12:19 pm on Oct 15, 2010 (gmt 0)

Dear tedster/encyclo/rocknbil,

Thanks for the answer! :-)


 1:27 pm on Oct 15, 2010 (gmt 0)

Validation is supposed to be helpful not a hindrance - just use the target attribute anyway.

As a matter of principle, you should never allow the decisions of stupid people to inconvenience you if you can avoid it. Everyone with more than two brain-cells to rub together knows that the target attribute is perfectly sensible - it's only been deprecated because a few brain-dead code-nazis managed to weasel their way into a position where they would wield a little power and annoy people.



 12:26 pm on Oct 25, 2010 (gmt 0)

Good call Kaled, I couldn't have put it better.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved