Hi All,
I have a question regarding the use of the input tag in forms when using xHTML 1.1 strict.
Basically I'm getting errors suggesting the input tag is not allowed inside the form e.g: document type does not allow element "input" here; missing one of "ins", "del", "h1", "h2", "h3", "h4", "h5", "h6", "p", "div", "address", "fieldset" start-tag.
I've heard mention of the input tag not existing in xHTML strict, but I'm a) not sure if that is true and b) am not aware of an alternative.
The code in question is shown below:
[HTML]<div class="siteproject">
<p class="h8">Iris</p>
<p><a href="img/iris.html" class="projectlink">click to enlarge</a></p>
<p><a href="img/iris.html" class="projectimg"><img src="img/jpg/irissmall.jpg" alt="iris image" class="projimg"/></a></p>
<!-- START CART CODE -->
<p>Iris - £28.95</p>
<form action="http://www.romancart.com/cart.asp" method="post">
<input type="hidden" name="storeid" value="12345"/>
<input type="hidden" name="price" value="28.95"/>
<input type="hidden" name="quantity" value="1"/>
<input type="hidden" name="itemname" value="Iris Kit"/>
<input type="submit" value="Add to Basket"/>
</form>
<!-- END CART CODE -->
</div>[/HTML]
I cannot see any particular reason why this would not be correct code, except for perhaps my css div declaration implying an inline element, so maybe the validator see's it as a <p> or equivilent and doesn't like the form or input tags being inside it.
Can anyone shed any light on this? It's bugging me now!