M
Mitja
I need some help to get a thing straight: why doesn't W3C's validator allow
the <input> element as a direct descendant of <form>?
An example of it can be seen at
http://www.oktaeder.com/?page=g_single&game=444 (search for "hidden" in
source), and here are the validation results:
http://validator.w3.org/check?uri=http://www.oktaeder.com/?page=g_single&game=444
The error I get is ''document type does not allow element "INPUT" here;
missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV",
"ADDRESS" start-tag''. This seems clear enough, and sure thing, if I change
<div><form><input> to <div><form><p><input>, it validates. What is bugging
me is that I don't understand this behavior. I don't doubt it's specified
somewhere, but can't find it.
http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#h-17.4
doesn't seem to mention anything in that direction. HtmlHelp, which is more
comprehensible if not as official, explicitly says that <input> may be
contained in any block-level element, which <form> is. Any hints?
Mitja
the <input> element as a direct descendant of <form>?
An example of it can be seen at
http://www.oktaeder.com/?page=g_single&game=444 (search for "hidden" in
source), and here are the validation results:
http://validator.w3.org/check?uri=http://www.oktaeder.com/?page=g_single&game=444
The error I get is ''document type does not allow element "INPUT" here;
missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV",
"ADDRESS" start-tag''. This seems clear enough, and sure thing, if I change
<div><form><input> to <div><form><p><input>, it validates. What is bugging
me is that I don't understand this behavior. I don't doubt it's specified
somewhere, but can't find it.
http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#h-17.4
doesn't seem to mention anything in that direction. HtmlHelp, which is more
comprehensible if not as official, explicitly says that <input> may be
contained in any block-level element, which <form> is. Any hints?
Mitja