HTML fieldset - how to use <fieldset> tag

The HTML <fieldset> tag is used to group related items in a <form> tag and is usually displayed with a border around it.

Attributes

The fieldset tag supports the global and event attributes.

disabled
Defines whether the form elements should be disabled
form
Defines the id of the form for this fieldset. Note the fieldset can belong to multiple forms.
name
Defines a name for the fieldset

Examples:

<form> <fieldset> <legend>Form data:</legend> First Name: <input type="text"><br/> Last Name: <input type="text"><br/> Email: <input type="text"><br/> <input type="submit" value="Submit" /> </fieldset> </form>