W3C Validation of FORM
Hi, I'm having trouble with the W3C validation of the search for I have been trying to include in my page. Test page was created as per the XHTML and CSS Web Sites.
Below is a cut-down version of a simple page/site which still doesn't go through the validation! I can't see why!
************************************************** **********
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 strict//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Test WebSite</title>
<style type="text/css">
<!--
body {
font-family: verdana, sans-serif;
}
-->
</style>
</head>
<body>
<div id="mainbody">
<form action="search.asp" method="post">
<input type="submit" name="submit" value="Search">
</form>
</div>
</body>
</html>
************************************************** ***********
The validation results are as follows...
------------------------------------------------------------------
Line 20, column 50: document type does not allow element "INPUT" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag
<input type="submit" name="submit" value="Search">
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "").
#9993;
Line 21, column 7: end tag for "FORM" which is not finished
</form>
Most likely, You nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>
Another possibility is that you used an element (e.g. 'ul') which requires a child element (e.g. 'li') that you did not include. Hence the parent element is "not finished", not complete.
---------------------------------------------------------------------
If I get rid of the input item, then just the second error is reported, so a simple opening of and form and closing it still wont validate!
Please can someone tell me what I'm doing wrong?!
Dave
|