INPUT TAG: <INPUT>
The input tag, which is specified within a pair of <FORM> tags, provides user input fields of varying types from simple text boxes, radio buttons and check boxes. The tag has the following attributes:
- ALIGN:
- Used to vertically align an image specified by the TYPE=image aattribute, this attribute can have one of the following values: absbottom, absmiddle, baseline, bottom, left, middle, right, texttop or top.
- CHECKED:
- Indicates that a check box or radio button is pre-selected. Unselected items do not return name-vale pairs when the form is submitted.
- MAXLENGTH:
- Indicates the maximum number of characters that can be entered into a text field.
- NAME:
- Required by most input types, this attribute is used to provide a unique identifier for an input field or a related group of fields.
- SIZE:
- Specifies the size or precision of the input field depending on its type.
- SRC:
- Used to provide a URL for an image specified by the TYPE=image attribute.
- TYPE:
- Defines the type of data that the input field can accept. The following data types are supported:
- Checkbox: This data type provides a group of check boxes any one or more of which can be selected or deselected by the user.
- Image: This attribute creates a clickable image field which when clicked causes the form to be submitted.
- Password: The same as the text attribute except the text entered is displayed as a row of asterisks.
- Radio: This data type provides a group of radio buttons any one only of which can be selected by the user.
- Reset: This attribute provides a button which when clicked resets all of the forms data fields to their specified initial values.
- Submit This attribute provides a button which when clicked submits the form to the server for processing.
- Text: This data type provides a single line text entry field.
- Value: This attribute determines the initial displayed value of the data field. This attribute is mandatory for the TYPE=radio function.
- Hidden: This defines an invisible input field whose value will be sent along with the other form values when the form is submitted. This is
used to pass state information from one script or form to another.