Easy learning with example program codes

Fieldset HTML

HTML <fieldset> Tag

In an HTML form, the logically related fields or labels can be grouped using the HTML <fieldset> tag. It is however not a mandatory tag for creating an HTML form. It is used with the HTML <legend> tag to define a caption for the grouped related fields as a first child.




<!DOCTYPE html>
  <legend>Undergraduate Details:</legend><br>
  Name of University: <input type="text"><br><br>
  Year of Passing: <input type="text"><br><br>
  Aggregate Marks: <input type="text"><br><br> 
  <input type="Submit"> 



In the above example, we have used the HTML <fieldset> tag to group logically related fields of a form.

Tag Specific Attributes:

disableddisabledUsed to determine that a group of related form elements should be disabled.
formform_idUsed to determine one or more forms the fieldset belongs to.
nametextUsed to determine a name for the fieldset.

Global Attributes:

The Global attributes are supported by the HTML <fieldset> tag.

Event Attributes:

The Event attributes are supported by the HTML <fieldset> tag.

Supporting Browsers:

Chrome, IE, Firefox, Opera and Safari.

Please follow and like us:
Posted in HTML   

Copyright © 2020 CodesJava Protection Status