This name is used during form submission and as a reference for other purposes.
<form action="/tutorial/action.html"> <button name="color" type="submit" value="Red">Red</button> <button name="color" type="submit" value="Blue">Blue</button> <button name="color" type="submit" value="Green">Green</button> </form>
Tip: Buttons with the same name, but with different values, make it easy to identify the button that submitted the form.
The name attribute assigns a name to the button.
Multiple <button> elements can have the same name, but with different values.
|name||String value. The button name.|
Here is when name support started for each browser:
Back to <button>