<input>Input tags are used with forms to retrieve user data. From buttons, to text fields, or checkboxes. Specify using the type attribute. Attribute | Description | accesskey | Create a shortcut key or a "Hotkey". By pressing and holding the "alt" key along with the hotkey, you can activate hyperlinks. Not supported by all browsers. | class | Classify or name your elements. For instance, if you classify several paragraph elements the same name, using CSS it is possible to give them all the same styles in one line of code. | checked | Presets a checkbox form item to default selected instead of blank. | dir | Change the display of text from left to right, or right to left. Very useful in language translation. | disabled | Disables an element from being used. It is still displayed but any scripts associated with it are disabled. | id | Specify an ID for your elements. | lang | Define the language to display your element in. Here's a link to the abbreviations of languages. http://www.oasis-open.org/cover/iso639a.html | maxlength | Define a maxlength to input forms. | name | Choose a name for an element. Names can be used with other web programming languages to unify your site or run scripts obtaining user info. | readonly | Sets an element to readonly, disallowing user alteration. | size | Add size to varying elements, usually indicates font size, or corresponders to the number of characters to be displayed with form elements. | style | Used to create inline styles such as CSS. | tabindex | Numbers elements in a tab order, allowing for manipulation of what happens when the user presses the "Tab" key. | title | Places a "pop-up" title for an element upon mouse over. Similar to "help" pop-ups in word programs. | type | Sets the type of element, several variations of types can be set for nearly all elements. | value | The String of your choice is now the value of that element. |
Code:
<form>
Select State:<input type="text" maxlength="2" size="2">
<input type="submit" value="Submit">
</form>
Display:
Closing Tag Information:
This tag does not require a closing tag. |