THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML <fieldset> name Attribute

❮ HTML <fieldset> tag

Example

A <fieldset> with a name attribute:

<fieldset name="personalia">
  Name: <input type="text"><br>
  Email: <input type="text"><br>
</fieldset>
Try it Yourself »

Definition and Usage

The name attribute specifies a name for a fieldset.

The name attribute is used to reference elements in a JavaScript, or to reference form data after a form is submitted.


Browser Support

Attribute
name Yes Not supported Yes Yes Yes

Differences Between HTML 4.01 and HTML5

The name attribute is new for the <fieldset> tag in HTML5.


Syntax

<fieldset name="text">

Attribute Values

Value Description
name Specifies the name of the fieldset

❮ HTML <fieldset> tag