input element is used to
create a variety of form input controls. The type of control is
defined by the
Following is a complete list of attributes (with descriptions) that
can be used with the
Not all attributes can be used with all control types. The attributes
associated with each control type are also provided.
Specifies alternative text for an image used as a button.
Specifies a comma-separated list of content types that a server processing the form will handle correctly. It can be used to filter out nonconforming files when prompting a user to select files to send to the server.
Assigns an access key (keyboard shortcut) to an element for quicker access.
When this attribute is added, a checkbox will be checked by default.
Disables the control for user input. It can only be altered via a script. Browsers may display disabled controls differently (grayed out, for example), which could be useful for dimming certain controls until required info is supplied.
Specifies the maximum number of characters the user can input for this element.
Required by all input types except
reset. Assigns a name to the control. A script program uses this name to reference the control.