In order to be valid xhtml input-tags should be enclosed by something, w3's validator says
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)

All form-functions except two (form_hidden and form_submit) uses theme('form_element') for output, leaving it up to the theme to fix it. _hidden and _submit returns the input-tag directly which (I believe) means that all forms are xhtml-invalid.

Comments

gábor hojtsy’s picture

It is completely enough to wrap the contents of form tags in a p or some other block level element. There is absolutely no need to add a block level element around each and every form item (according to W3C).

Anonymous’s picture

I agree, problem is that most forms output by drupal now does not do that and are therefore invalid (at least when using xtemplate theme).

TheLibrarian’s picture

If I'm not mistaken this is now fixed in cvs, should it be marked fixed?

dries’s picture

Anonymous’s picture