W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > October to December 2002

RE: OT - valid HTML question

From: Jon Hanna <jon@spin.ie>
Date: Tue, 12 Nov 2002 14:08:08 -0000
To: <w3c-wai-ig@w3.org>

> Can anyone tell me why form elements have to be enclosed in a <p></p> to
> validate as html 4.01 strict? I know that it's like that in the html spec
> but why? Why can't we just have all the elements in the
> <form></form> tags?
> At first I thought it was probably a block/inline thing but I'm
> not so sure
> now.

It is indeed. Form can only directly contain a block element, hence you need
to have a block element that can contain inline (<p>, <div>, <td> etc.) in
the form and the <input /> or whatever inside that.

See http://www.w3.org/TR/html4/strict.dtd for details.
Received on Tuesday, 12 November 2002 09:01:50 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:21 UTC