Definition: INPUT is an element used for a variety of entry field types with HTML fill-out forms. The type of field is determined by the TYPE attribute.
Standard Attributes: CLASS, ID, LANG, SRC, MD
TYPE is responsible for defining the type of field. Types include: HIDDEN, SUBMIT, TEXT, RANGE, FILE, PASSWORD, CHECKBOX, RADIO, SCRIBBLE, IMAGE or RESET. TYPE defaults to TEXT, and its attribute value is a case-insensitive SGML name token.
When submitting the form's data, NAME provides the character string that is used to name the field. It is possible that several fields may share the same name, which is case-insensitive.
VALUE is a number or character string that is used to initialize hidden fields, range, and text.
When DISABLED is present, the field cannot be modified by the user, although it should be rendered as normal regardless. Wherever the field is disabled, the rendering should ideally provide a clue to this state (by changing the background color, for example).
ERROR specifies an error message that explains why the field's current value registers as incorrect. The field can be assumed to be OK when this attribute is not present. It is recommended that user agents provide a cue indicating that the field is in error.
When CHECKED is present, it indicates that a checkbox or radio button should be initialized to its selected state.
SIZE specifies what a password field or text's visible width is. In the case of variable pitch fonts, SIZE specifies the width in en units (one-half the point size), while for fixed pitch fonts, the size attribute specifies the maximum number of visible characters.
MAXLENGTH specifies the maximum number of characters that are permitted for password fields and text.
Either an integer or real number, MIN specifies the lower bound for a range field.
Either an integer or real number, MAX specifies the upper bound for a range field.
ACCEPT is a list of MIME content types, separated by commas. It is used to restrict the types of files that you can attach to a form with a file field.
ALIGN applies only to fields that contain background images such as SUBMIT, SCRIBBLE, or IMAGE. Its use is intended to give you the same positional control as you would find with the IMG element. ALIGN can take values TOP or MIDDLE or BOTTOM. It thereby indicates which part of the graphic should be aligned with the baseline for the text line containing the IMG element.
ALIGN=LEFT will make the field float down and over into the current left margin, and any subsequent text will wrap around the field's right hand side. Similarly, ALIGN=RIGHT will make the field align with the right margin and wrap text around the left.
Context: <INPUT> is legal within
The following markup can be used within <INPUT>: None
Suggested style/usage: Close Tag: OPTIONAL
Examples: See Chapter 10 for a forms example.