Forum Moderators: mack
The W3C validator complains about the following code:
------------------
<div class="rnav">
<pre>Site Search</pre>
<form method="get" action="http://search.example.com/search/">
<input size="15" name="sp-q">
<input type="submit" value="Search">
<input type="hidden" name="sp-a" value="#*$!xxxxx">
<input type="hidden" name="sp-p" value="all">
<input type="hidden" name="sp-f" value="UTF-8">
</form>
</div>
------------------
In particular the error message seems to indicate that the use of <input> is incorrect. Can you spot what is wrong with that? The error message is:
"document type does not allow element "INPUT" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag."
I am sure I closed all the tags properly. The code is fine elsewhere. If I take the <form></form> part out, the page validates as HTML4.01 Strict.
Regards
[w3.org ]
An HTML form is a section of a document containing normal content, markup, special elements called controls (checkboxes, radio buttons, menus, etc.), and labels on those controls.
Note that the form is a special 'section' requiring normal block-level markup to hold content and controls.
<form method="get" action="http://search.example.com/search/">
<p>
<input...
<input...
</p>
</form>
Cheers