Click to See Complete Forum and Search --> : what's wrong with this?
http://www.medford.k12.or.us/thing.htm
Any idea why this won't validate? its saying that <input> isn't allowed within a <form> most likely I'm just making a stupid mistake, but I can't seem to see the problem here.
PunkSktBrdr01
03-18-2004, 07:22 PM
I got the same type of message, too. Apparently, you have to enclose the input in one of the tags in the list:
"p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del"
fredmv
03-18-2004, 07:26 PM
The above is basically correct. All child elements of your form must be enclosed within a block-level element.<form action="send.php" method="post">
<div>
<input type="text" name="name" value="Name" id="thename" />
<textarea name="msg" id="message" rows="" cols=""></textarea>
<input type="submit" value="Send" id="submitter" />
</div>
</form>
yeah, I never knew that was required... wierd...
Paul Jr
03-18-2004, 09:16 PM
Originally posted by fredmv
The above is basically correct. All child elements of your form must be enclosed within a block-level element.
I was under the impression that the <form> element was a block-level element. It is according to the W3C, though, it is under the HTML 4.0 section. However, I have so far been unable to find this type information elsewhere...
fredmv
03-18-2004, 09:24 PM
Originally posted by Paul Jr
I was under the impression that the <form> element was a block-level element. It is according to the W3C, though, it is under the HTML 4.0 section. However, I have so far been unable to find this type information elsewhere... It indeed is. Though, I was referring to the fact that once inside the form, you must then enclose all child elements within a block-level element. In other words, simply having the <form> tag there doesn't really count. You must have it there, and then as aforementioned, everything inside must be contained within a block-level element.