Following is the mark-up I’m using:
<form method="get" action="http://www.google.com/search">
<label for="q">Search:</label>
<input id="q" name="q" size="20" maxlength="255" value="" type="text" />
<input name="domains" value="http://www.bubbleunder.com/" type="hidden" />
<input name="sitesearch" value="http://www.bubbleunder.com/" checked="checked" id="mysite" type="radio" />
<label for="mysite">Just this site</label>
<input name="sitesearch" value="" id="www" type="radio" />
<label for="www">Web</label>
<input name="btnG" value="Go" type="submit" />
</form>
When I try to validate it using W3C I get a whole bunch of error messages like:
Line 20, Column 20: document type does not allow element "label" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
<label for="q">Search:</label>
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 “<font>”).
Does anyone know how I can validate correctly? Thanks, Jos:)