HTML <input> Tag with the 'name' Attribute

<form name="myForm" action="">
<input name="myInputField">



The above example demonstrates usage of the <input> element with the name attribute.

The name attribute provides the name of a form control. The value provided by the name attribute is submitted with the form and can be used by any script that processes the contents of the form.

Any value can be provided, however, the following values have special meaning (as outlined in the HTML5 specifications):

This value, if used as the name of a Text control that is the first control in a form that is submitted using the application/x-www-form-urlencoded mechanism, causes the submission to only include the value of this control, with no name.
This value, if used as the name of a Hidden control with no value attribute, is automatically given a value during submission consisting of the submission character encoding.