HTML <fieldset> Tag

Advertisements


Description

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.

Example

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

This will produce following result:

Details Student Name:
MCA Subjects:
Course Link:

Global Attributes

This tag supports all the global attributes described in - HTML Attribute Reference

Specific Attributes

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

AttributeValueDescription
align left
right
center
top
bottom
Deprecated - Specifies the content alignment.
disabled html-5disabledSpecifies that a group of related form elements should be disabled.
form html-5form_idSpecifies forms which belongs to fieldset.
name html-5textSpecifies a name for fieldset.

Event Attributes

This tag supports all the event attributes described in - HTML Events Reference

Browser Support

ChromeFirefoxIEOperaSafariAndroid
YesYesYesYesYesYes

html_tags_reference.htm

Advertisements