- Attribute of
- Creating A Button With The HTML Button Element: Here's How
- What does
- Defines the name of the button, which is used for form inputs and labels.
<button name="click-me">Click me.</button>
name attribute is used for submitting form data as
name=value pairs, and is referenced by other form features, such as the
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
ids present, as
name can have only one value.
Browser Support for name