<button name="">
Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
- Attribute of
- Creating A Button With The HTML Button Element: Here's How
- What does
<button name="">
do? - Defines the name of the button, which is used for form inputs and labels.
Code Example
<button name="click-me">Click me.</button>
The name
attribute is used for submitting form data as name=value
pairs, and is referenced by other form features, such as the <label>
element’s for
attribute. It is common practice (though not at all required) for the name
attribute to double the id
attribute. This may not work if there are multiple id
s present, as name
can have only one value.
Browser Support for name
All | All | All | All | All | All |