Usually, I've seen it with forms, but I've found it helpful to group related sets of data (eg when you have multiple tables on a page, using a fieldset around each table or group of related tables to define a visible meaning and a group name (legend)). Is this abusing the fieldset tag to the point where, in my uses, it no longer has semantic meaning?
The <fieldset> tag is used to group related elements in a form. The <fieldset> tag draws a box around the related elements.
<fieldset>: The Field Set element. The <fieldset> HTML element is used to group several controls as well as labels ( <label> ) within a web form.
You can use any form elements outside of an actual form, since most of them can be used with JavaScript utilities outside the form. The form is only needed if you plan on allowing the user to submit the data with it.
The fieldset element is used to group related form controls and their labels within a web form. To mark-up for the fieldset includes a Start and an End tag. Multiple fieldset elements can be included inside a single form. In this example, there's a fieldset for contact details and a second fieldset for account details.
I believe this would be abuse. http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.10 states "The FIELDSET element allows authors to group thematically related controls and labels".
The "field" bit in the name fieldset
refers to <form>
fields.
Using fieldset
outside form
s to group aribtrary data is clearly semantic misuse.
However, your HTML will validate and God will not Kill a Kitten.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With