[whatwg] [wf2] 2.3. Changes to existing controls
ian at hixie.ch
Mon Mar 21 04:23:52 PST 2005
On Mon, 21 Mar 2005, Anne van Kesteren wrote:
> # The children of a form element must be block-level elements, unless
> # one of the ancestors of the form element is a td, th, li, dd, dt, or
> # block-level element other than div, in which case either block-level
> # or inline-level content is allowed (but not both). input elements of
> # type hidden may be placed anywhere (both in inline contexts and block
> # contexts).
> Why does the content model of the FORM element have to be so difficult?
> Why can't it be either block- or inline-level irrespective of its parent
The main reason is to allow people to write markup like:
...instead of requiring:
...but without allowing:
In the table cell case there are semantics -- maybe the cell is part of a
spreadsheet or something -- but in the <body> case the input doesn't have
any particular semantics. It's not grouped into a thematic unit (like a
paragraph or list). It's just... there. It would be like:
...which is also not allowed.
> (Note also that the block- or inline-level model can't be described by a
> DTD, only with a schema, but I don't believe that is a problem, is it?)
As noted in the WA1 draft, conformance checkers will need to be a lot more
involved than schema- or DTD-based validators anyway.
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg