<INPUT> Tag & its Attribute
HTML Tag <INPUT>
<INPUT> Identifies several input methods for forms. This tag must appear between the opening and closing <FORM> tags.
Attribute of <INPUT> Tag
- ACCEPT
- ALIGN
- CHECKED
- CLASS
- DATAFLD
- DATASRC
- DISABLED
- ID
- MAXLENGTH
- NAME
- NOTAB
- READONLY
- SIZE
- SRC
- STYLE
- TABINDEX
- TITLE
- TYPE
- USEMAP
- VALUE
ACCEPT
Specifies a list of acceptable MIME types for submitted files.
Possible Values
File Type.
ALIGN
The behavior of this tag is identical to that of the ALIGN= attribute of the <IMG> tag.
Possible Values
LEFT, CENTER, RIGHT
CHECKED
Use with TYPE=RADIO or TYPE=CHECKBOX to set the default state of those input methods to True.
Possible Values
CHECKED
CLASS
Indicates which style class applies to the <INPUT> element.
Possible Values
Any Class Name.
DATAFLD
Selects a column from previously identified tabular data.
Possible Values
Field Name.
DATASRC
Specifies the location of tabular data to be bound.
Possible Values
DataSource
DISABLED
Disables an instance of the input method so that data cannot be accepted or submitted.
Possible Values
DISABLED
ID
Assigns a unique ID selector to an instance of the <INPUT> tag. When you then assign a style to that ID selector, it affects only that one instance of the <INPUT> tag.
Possible Values
Any ID Name.
MAXLENGTH
Indicates the number of characters you can enter into a text input field and is only useful to input methods of type TEXT or PASSWORD.
Possible Values
Any Integer Number.
NAME
Gives a name to the value you pass to the form processor.
Possible Values
Any Name.
NOTAB
Removes the input element from the tab order.
Possible Values
NOTAB
READONLY
Indicates that changes to the input method data cannot occur.
Possible Values
READONLY
SIZE
Specifies the width of the input method (in characters).
Possible Values
Any integer number.
SRC
Implements a graphic image for a submit button. For this to work, indicate TYPE=IMAGE.
Possible Values
URL
STYLE
Specifies Style Sheet commands that apply to the input element.
Possible Values
CSS Property with value.
TABINDEX
Specifies where the input method appears in the tab order. For example, TABINDEX=3 places the cursor at the input element after the visitor presses the Tab key three times.
Possible Values
Any Integer Number.
TITLE
Specifies text assigned to the tag. You might use this attribute for context-sensitive help within the document. Browsers may use this to show tool tips over the input method.
Possible Values
Any Text Message.
TYPE
Indicates the kind of input method to use. Valid values are TEXT, PASSWORD, RADIO, CHECKBOX, SUBMIT, RESET, IMAGE, FILE, HIDDEN, and BUTTON.
Possible Values
TEXT, PASSWORD, RADIO,CHECKBOX, SUBMIT, RESET, IMAGE, FILE, HIDDEN, BUTTON.
USEMAP
Indicates the relative or absolute location of a client-side image map to use with the form.
Possible Values
URL
VALUE
Sets the default input value method. Required when <INPUT> is set to TYPE=RADIO or CHECKBOX.
Possible Values
Any Value.