HTML <fieldset> name attribute
Definition and Usage
name
Attribute specifies the name of the fieldset.
name
Attribute is used to refer to elements in JavaScript, or to refer to form data after submitting the form.
Example
With the name attribute of <fieldset>:
<form action="/action_page.php" method="get"> <fieldset name="personalia"> <label for="fname">Name:</label> <input type="text" id="fname" name="fname"> </fieldset> <br> <button type="button" onclick="form.personalia.style.backgroundColor='yellow'"> Change the background color of the fieldset</button> <input type="submit"> </form>
Syntax
<fieldset name="text">
Attribute Value
Value | Description |
---|---|
name | Specifies the name of the fieldset. |
Browser Support
The numbers in the table indicate the first browser version that fully supports this attribute.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 11.0 | Support | Support | Support |