WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML <fieldset> Tag


Example

Group related elements in a form:

<form>
  <fieldset>
    <legend>Personalia:</legend>
    Name: <input type="text"><br>
    Email: <input type="text"><br>
    Date of birth: <input type="text">
  </fieldset>
</form>
Try it yourself »

Definition and Usage

<fieldset> Tags group related elements within a form.

<fieldset> Tags draw borders around related form elements.


Browser Support

Element
<fieldset> Yes Yes Yes Yes Yes Yes

Differences Between HTML 4.01 and HTML5

HTML5 has added new attributes for <fieldset>.


Attributes

= New in HTML5.

attribute value Description
disabled disabled Specifies that related form elements in this group should be disabled.
form form_id Specifies the form or forms to which the fieldset belongs.
name text Specifies the name of the fieldset.