Previous Message
Next Message

Use of FIELDSET and LEGEND elements without FORM

Sent by Jukka K. Korpela on 10 September 2003 20:08


On Wed, 10 Sep 2003, A. Lincoln wrote:

> Is use of following code valid? I ran it against a validation check on
> DWMX and it did not report any error.

If you have doubts about validity, you should check the relevant DTD,
or maybe use a validator.

> <h1>Error Page</h1>
> <fieldset>
> <legend>Error Message</legend>
> <label>Unable to process information because of blah, blah =85</label>
> </fieldset>

When a suitable HTML doctype is used, it is valid. But why would you use
such a construct outside a form? After all, the _meanings_ of fieldset,
legend, and label elements are defined in reference to forms and form
fields. Besides, how does this relate to CSS?

If you're thinking of using fieldset etc. for merely presentational
purposes, i.e. to get the presentation that you expect browsers to use for
such elements by default, then it's not just illogical but also
impractical. Those elements have different presentational features that
are only in part describable in CSS terms, and thus you would have
inadequate tools for affecting the appearance.

--=20
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: