HTML <input> Tag with the 'name' Attribute
<form name="myForm" action="http://www.htmlcodes.ws/resources/html-forms-action.cfm">
<input name="myInputField">
<button>Submit</button>
</form>
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):
isindex
- 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. _charset_
- 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.