input — <input />

The input element is used to create a variety of form input controls. The type of control is defined by the type attribute. Following is a complete list of attributes (with descriptions) that can be used with the input element. Not all attributes can be used with all control types. The attributes associated with each control type are listed below.


Core,Internationalization, Events, Focus ;plus onselect, onchange


Specifies alternative text for an image used as a button.

accept="MIME type"

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.


Deprecated. Specifies the alignment of an image.


When this attribute is added, a checkbox will be checked by default.


Disables the control for user input. It can be altered only 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.


Indicates that the graphic is used as the basis for a server-side image map (an image containing multiple hypertext links). This attribute may be used with the “image” input type only.


Specifies the maximum ...

Get HTML and XHTML Pocket Reference, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.