The fieldset element puts a box around other elements for grouping purposes. It makes your forms neater and easier to understand by organizing data into groups.
For example... a field labeled First may be somewhat ambiguous... but if it was inside a box titled Name one could then assume that First means First Name.
Although the fieldset was designed for forms... it can be used anywhere in a HTML Document. To outline a paragraph... for example.
CREATED2020-09-15 10:15:02.0
010-00-02-F6
UPDATED2020-09-15 10:15:11.0
The Legend...
However the title of the box doesn't come with it per se... You have to employ the legend tag to get that title up there.
You could do something similar by styling another HTML tag... but... only fieldset has a legend.
CREATED2020-09-16 07:24:08.0
010-00-03-04
UPDATED2020-09-16 07:24:19.0
The Attribues
In addition the HTML Global Attrbuties and Events, fieldset supports these attributes...
Name
Value
Description
disabled
none
Disables everything in the fieldset or group
form
id
The id of the form the fieldset belongs to
name
text
Name of the field set
CREATED2020-09-16 06:14:33.0
010-00-02-F7
UPDATED2020-09-16 07:24:19.0
Putting it Together...
Using fieldset and legend we can make our forms look organized and well presented...