The HTML Form Attribute element is used to create interactive controls for web-based forms in order to accept data from the user. This attributes can be used on the following elements such as :
value attribute specifies the initial value for an input field.
readonly attribute specifies that the input field is read only that means the value of input field cannot be changed.
disabled attribute specifies that the input field is disabled. You cannot make any modification on input field.
size attribute specifies the size for the input field in character.
maxlength attribute specifies the maximum length allowed for the input field.
Here is a list of some common Attributes in HTML 5.
|It gives the autocomplete functionality to the form.
|It make sure that the input field automatically get focused when the page loads.
|It specifies one or more forms, an <input> element belongs to.
|It specifies the URL of a file where the form data will get transferred and processed after submitting.
|It specifies how the form data should be encoded when submitted.
|It defines the HTTP method for sending form-data to the action URL.
|It specifies that the <input> element should not be validated.
|It specifies where to display the response that is received after submitting the form. Ex. - _blank, _self, framename, etc.
|height & width
|It specifies the height and width of an <input> element.
|It's value gives a particular id to a <datalist> element that contains pre-defined options for an <input> element.
|min and max
|It specifies the minimum and maximum values for an <input> element.
|It allows the user to enter more than one value in the <input> element.
|It defines a regular expression for an <input> element's value.
|It gives a hint about the value to be entered in the <input> element.
|It specifies that an input field must be filled out before submitting the form.
|It specifies the legal number intervals for an <input> element.