View Full Version : Submit button validation

12-23-2009, 04:36 PM
I have this line of code that won't validate in xhtml strict

code]<input type="submit" name="submit" value="Add Subject"/>[/code]

I have exactly the same code in other pages that validates fine, here is the error message.

Line 122, Column 60: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag



12-23-2009, 04:39 PM
Looks like you are nesting that element directly under your form. You need to add a block level element like div,p etc(a fieldset would be more semantic) inside your form to wrap all inline elements.