content logo

Learn HTML:

Html fieldset tag

The HTML <fieldset> tag is used for grouping related form elements. By using the fieldset tag and the legend tag, you can make your forms much easier to understand for your users.


<!DOCTYPE html>
<title>HTML fieldset Tag</title>
  Student Name: <input type="text"><br />
  MCA Subjects:<input type="text"><br />
  Course Link:<input type="url" name="websitelink">

This will produce following result:

DetailsStudent Name: 
MCA Subjects:
Course Link:

Specific Attributes

The HTML <fieldset> tag also supports following additional attributes:

Attribute Value Description
align left
Deprecated - Specifies the content alignment.
disabled  disabled Specifies that a group of related form elements should be disabled.
form  form_id Specifies forms which belongs to fieldset.
name  text Specifies a name for fieldset.

HTML Fieldset Example


HTML Fieldset Code


HTML Fieldset Tutorial