Input Control Elementssuggest change
A key component of interactive web systems, input tags are HTML elements designed to take a specific form of input from users. Different types of input elements can regulate the data entered to fit a specified format and provide security to password entry.
<input type="" name="" value="">
Parameter | Details |
——— | —–– |
class | Indicates the Class of the input|
id | Indicates the ID of the input |
type | Identifies the type of input control to display. Acceptable values are
button. Defaults to
text if not specified, if the value is invalid, or if the browser does not support the type specified. |
name | Indicates the name of the input|
disabled | Boolean value that indicates the input should be disabled. Disabled controls cannot be edited, are not sent on form submission, and cannot receive focus. |
checked | When the value of the type attribute is radio or checkbox, the presence of this Boolean attribute indicates that the control is selected by default; otherwise it is ignored. |
multiple | HTML5 Indicates multiple files or values can be passed (Applies only to
type attribute is either set to
required | HTML5 Indicates a value must be present or the element must be checked in order for the form to be submitted |
alt | An alternative text for images, in case they are not displayed.
autofocus | The
<input> element should get the focus when page loads.
value | Specifies the value of
step | The
step attribute specifies the legal number intervals. It works with the following input types:
As with other HTML5 void elements,
<input> is self-closing and may be written
<input />. HTML5 does not require this slash.
The following are valid input types in HTML:
The following are newly introduced input types as a part of HTML 5 standard. Some of these types are not supported by all web browsers. In the case where a type is not supported, the input element will default to the
To check which browsers support which types, you can go to caniuse.com.