HTML <fieldset> nameAttribute

HTML fieldset 标签参考手册HTML <fieldset> Tag

Examples

<fieldset> with a name attribute:

<fieldset name="personalia">
  Name: <input type="text"><br>
  Email: <input type="text"><br>
</fieldset>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the name attribute, except Internet Explorer.


Definition and Usage

The name attribute specifies the name of the fieldset.

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


Differences between HTML 4.01 and HTML5

This attribute is new to the <fieldset> tag in HTML5.


Syntax

<fieldset name="text">

Attribute Values

Value Description
name Specifies the name of the fieldset.


HTML fieldset 标签参考手册HTML <fieldset> Tag Other Extensions