HTML <input> name Attribute
Example
<form action="action.php">
<label for="fname">First name:</label>
<input type="text" id="fname" name="fname">
<label for="lname">Last name:</label>
<input type="text" id="lname" name="lname">
<input type="submit" value="Submit">
</form>
Meaning
The name attribute allows a form control to be assigned a name to set as the name/value pair value sent to the server.
Standard Syntax
HTML: <input name="text">
XHTML: <input name="text"/>
Advertisement
Attribute Values
| Value | Description |
|---|---|
| text | Specifies the name/value of the <input> element |