input element represents a field whose contents may be edited
by the user. It has these attributes.
Vertical alignment of the image - for use only with
type=image. The possible values are exactly the same as for
align attribute of the
Indicates that a checkbox or radio button is selected. Unselected checkboxes and radio buttons do not return name/value pairs when the form is submitted.
Indicates the maximum number of characters that can
be entered into a text field. This can be greater that
size, in which case the field will scroll
appropriately. The default is unlimited.
Symbolic name used when transferring the form's contents. This attribute is required for most input types and is normally used to provide a unique identifier for a field, or for a logically related group of fields.
Specifies the size or precision of the field according to its type. For example, specify input type text size="24" to specify a field with a visible width of 24 characters.
A URL or URN specifying an image - for use only with
Defines the type of data the field accepts. Defaults to free text. Several types of fields can be defined with the type attribute:
Used for simple Boolean attributes, or for
attributes which can take multiple values at the
same time. The latter is represented by a
number of checkbox fields each of which has the
name. Each selected checkbox generates a
separate name/value pair in the submitted data,
even if this results in duplicate names. The
value for checkboxes is
No field is presented to the user, but the content of the field is sent with the submitted form. This value may be used to transmit state information about client/server interaction.
An image field upon which you can click with a
pointing device, causing the form to be
immediately submitted. The coordinates of the
selected point are measured in pixel units from
the upper left corner of the image, and are
returned (along with the other contents of the
form) in two name/value pairs. The
is submitted under the name of the field with
appended, and the
y-coordinate is submitted
under the name of the field with
value attribute is ignored. The image itself is
specified by the
src attribute, exactly as for the
imagefunctionality will be folded into an enhanced
For attributes which can take a single value
from a set of alternatives. Each radio button
field in the group should be given the same
Only the selected radio button in the group
generates a name/value pair in the submitted
data. Radio buttons require an explicit
This is a button that when pressed resets the
form's fields to their initial values as specified by
This is a button that when pressed submits the
form. You can use the
value attribute to provide a
(non-editable) label to be displayed on the
button (the default label is application-specific).
name attribute is not required; a
button only contributes a name/value pair to the
submitted data if it has a name and was the
button that was pressed in order to submit the
Single line text entry fields. Use in conjunction
maxlength attributes. Use the
textarea element for text fields which can accept
The initial displayed value of the field, if it displays a textual or numerical value; or the value to be returned when the field is selected, if it displays a Boolean value. This attribute is required for radio buttons.