j05hr
12-16-2009, 10:52 AM
How would you validate this in xhtml strict? I had a look on google but everyone seemed to be doing it the exact same way.
<label for="contactYou" class="fixedwidth">Best way to contact you?</label>
<select name="contactYou" id="contactYou">
<option>Home</option>
<option>Work</option>
<option>Mobile</option>
</select>
Error Line 111, Column 28: 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="contactYou">Best way to contact you?</label>
Thanks,
Josh
<label for="contactYou" class="fixedwidth">Best way to contact you?</label>
<select name="contactYou" id="contactYou">
<option>Home</option>
<option>Work</option>
<option>Mobile</option>
</select>
Error Line 111, Column 28: 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="contactYou">Best way to contact you?</label>
Thanks,
Josh