[thelist] where should form inputs go for valid xhtml?

Sarah Adams mrsanders at designshift.com
Thu Aug 10 14:13:24 CDT 2006


> Why is it that you don't 'need' one? If you are using "<input> tags" 
> then it sounds like you are attempting to represent in HTML a set of 
> input fields. The tag used to informationally contain such as set would 
> indeed be the <fieldset> tag.
> 
> You may not 'need' one for the visual effect, but I generally recommend 
> approaching HTML not as a tool for creating a visual render in a 
> browser, but as a tool to represent information. Given that approach, it 
> sounds like a <fieldset> tag would be in order.

That's where I'm unsure - doesn't the <form> tag itself serve this
purpose? If so, adding a <fieldset> inside the <form> would be
redundant. That's why I think of it as being unnecessary. And I don't
really want to add unnecessary tags just for the sake of validation -
otherwise I'd take the easy road and just wrap each label/field pair in
a <p> tag and be done with it :)

I guess it's a question of semantics and whether this:
  <form>
    <fieldset>
      <label></label><input />
    </fieldset>
  </form>
is more correct than this:
  <form>
    <label></label><input />
  </form>

-- 
sarah adams
web developer & programmer
portfolio: http://sarah.designshift.com
blog: http://hardedge.ca



More information about the thelist mailing list