codescracker


html

HTML FIELDSET and LEGEND Tags



« Previous Tutorial Next Tutorial »


HTML FIELDSET Tag

The FIELDSET tag is used to group related controls in a single box. Grouping the related controls displays the form fields in a more organized manner.

Suppose you have a form that is used for user registration as well as for the login process. Using the FIELDSET tag, you can group the controls for the login process and the user registration process in two separate boxes. This makes the user easily understand the purpose of each control on the form.

Attributes of the FIELDSET tag

The following table describes the attributes of the FIELDSET tag.

Attribute Description
disabled Disables the textarea
name Refers to the name of the textarea
form Refers to the id of a form

HTML LEGEND Tag

The LEGEND tag is used to provide caption for the FIELDSET tag. Using the LEGEND tag, you can provide the caption for the login process and the user registration process as Sign-In and Create an Account, respectively.


« Previous Tutorial Next Tutorial »



Tools
Calculator

Quick Links
Signup - Login - Give Online Test