This below code is forbidden in XHTML 1.1 strict mode:
<form method="post" action="index">
<input id="_method" name="_method" type="hidden" value="" />
</form>
If you want it to be valid then you need to wrap it with a div (or p, etc..) like:
<form method="post" action="index">
<div>
<input id="_method" name="_method" type="hidden" value="" />
</div>
</form>
How does this make any sense at all?
According to the W3C and this site the
<form>element in XHTML 1.1 may only contain block level elements and<fieldset>.As for why … I believe that the reason that
formmay only contain block-level elements is because it is not considered an element in itself, but rather a wrapper around other elements. There was some discussion of this in the w3c’s mailing lists some years ago that I was able to dig up — but nothing that actually answered the question.