HTML
Try it »
Browser support





All major browsers support the name attribute.
Definition and Usage
The name attribute specifies a name for the button.
The name attribute is used to reference the element in JavaScript, or to reference the form data after the form is submitted.
Tip: Different button elements can share the same name. This allows you to tag several buttons with the same name so that they can submit different values when used in a form.
Differences between HTML 4.01 and HTML5
NONE.
Syntax
Attribute values
| Value | Description |
|---|---|
| name | Specifies the name of the button. |
HTML