W3C home > Mailing lists > Public > www-validator@w3.org > April 2010

Re: question regarding the input tag

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Thu, 1 Apr 2010 19:40:00 +0300
Message-ID: <96FFB7E066F94231970D1F195273C3D5@JukanPC>
To: "JOHN HOLLOWAY" <jmhollowayii@gmail.com>, <www-validator@w3.org>
JOHN HOLLOWAY wrote:

> Is it a correct interpretation of the XHTML 1.0 standard (using STRICT
> validation) that the input tag can be used outside of a form (<form>)
> tag?

Yes.

The general idea is that input elements normally appear inside form 
elements, and it is wise to put them there even if the elements are 
JavaScript-driven. The reason is that by putting them in a form element and 
by setting up a suitable server-side form handler, you can create backup 
processing of data, for situations where client-side scripting is disabled. 
(This is sometimes impractical, admittedly.)

However, such ideas have not been enforced in the form syntax (or even 
presented in prose requirements). An input element may appear wherever text 
is allowed.

> The more current browsers (e.g., Firefox 3.6.x) seem to handle the
> code as I had expected/hoped; while IE 6.29.x seems to require that
> the <input> tags
> be enclosed within a <form> tag in order to correctly process the
> code, even with a DOCTYPE specifying  xhtml 1.0  STRICT.

I haven't seen browsers require such things (and you might ask about this on 
some other forum, providing a URL of a demo), but that would be outside the 
scope of validation. Despite all the misleading propaganda, validation by 
means guarantees that the code works across browsers, or is "interoperable". 
(It might make it more probable, for some values of "probable".)

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 
Received on Thursday, 1 April 2010 16:42:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:40 GMT