2008/8/7 Paul Collins <[EMAIL PROTECTED]>:
>
> This is one I've never been sure of; should the submit button be in a
> seperate fieldset, or should it even be in a fieldset at all because it is
> not a group  of fields; it's a button on it's own.
>
> For example:
>
> <form>
>     <fieldset>
>         <label>Search</label>
>         <input type="text" value=""/>
>     </fieldset>
>     <input type="submit"/>
> </form>
>
> As opposed to:
>
> <form>
>     <fieldset>
>         <label>Search</label>
>         <input type="text" value=""/>
>         <input type="submit"/>
>     </fieldset>
> </form>
>

Hi Paul,

in strict (X)HTML documents, the FORM element must only contain block
elements [1].
Therefore, an INPUT element as a direct child of FORM would be invalid
for documents with strict DTDs.

Using transitional DTDs, the FORM element may as well contain inline
elements such as INPUT.

Apart from considering the validity of the markup in question, the
complexity of the form could guide one. In your example with a single
text input field one might view the submit button to be part of this
same fieldset.
In more complex forms, e.g. a feedback form which requires input of
name, e-mail, and a textarea for free text, the submit button would
rather require its own FIELDSET or DIV or P parent element.

Cheers,

jens

[1] http://www.w3.org/TR/html401/interact/forms.html#edef-FORM
-- 
Jens Brueckmann
http://www.yalf.de


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to