name
The name attribute identifies a form control so its value is included under that key when the form is submitted.
Syntax
name="key" Examples
<form action="/login" method="post">
<input name="username">
<input name="password" type="password">
</form>
Output
Submits the body as username=...&password=... using the name keys.
Notes
Controls without a name are not submitted. Radio buttons sharing a name form a single mutually exclusive group. Also used for targeting (form, iframe) and the URL fragment.
Browser & runtime support
| Environment | Since version |
|---|---|
| chrome | 1.0 |
| firefox | 1.0 |
| safari | 1.0 |
| edge | 12 |