
Opening tag : <Input>
Closing tag: -
Purpose:
The Input tag is used to collect information from the user. There is no closing tag, but certain parameters need to be used, for instance the type attribute allows you to choose between a text box or a radio button.
Attributes:
Accesskey=char
- This allows a user to jump directly to a certain field by pressing the correct 'access key'. On Windows the user uses 'ALT' in combination with another key as specified in the Accesskey attribute.
Alt=string
- An Alternative text to be displayed while the input tag loads.
Checked
- For Radio Buttons or Checkboxes, the Checked attribute allows a choice to be selected by default.
Disabled
- Stops the input field from being used.
Maxlength=#
- Specifies a maximum length of input.
Name=name
- Allows a name to be given to the input field. The name is then used to pass variables through the action of a form.
Event=Javascript
- Javascripts can be called to act on certain events, for example 'onchange'
Readonly
- Specifies that a field can not be changed by the user.
Size=#
- Specifies the size of the field. For text and password this size is in characters.
Src=url
- Specifies the location of an image to be used for the image type.
Tabindex=#
- Allows the order of fields to be 'tabbed' through to be changed.
Type=value
- Specifies the type of input. Choices are; TEXT, PASSWORD, CHECKBOX, RADIO, SUBMIT, RESET, FILE, HIDDEN, IMAGE, BUTTON.
Value=string
- Sets the initial value of the field.
Example:
<Input Type="Button" Value="Click Me!">
Related Tags:
<Form></Form> - Form Tag.
Back to:
Alphabetical Guide
Guide By Type