The cover of The Complete Idiot's Guide to Create a Web Page The Complete Idiot's HTML Tag Reference

| Index | Previous Tag: <INPUT> (SUBMIT) | Next Tag: <INS> |


<INPUT> (TEXT)

Creates a form control into which the user can enter text.

Support:

HTML StandardInternet ExplorerNetscape Navigator
2.0 and later 1.0 and later 1.0 and later
Attributes:
ACCESSKEY = "Text (single character)"
A character to use as a keyboard shortcut for selecting the control.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later Not supported

Notes:

  • The access key is invoked by using it as a key combination. For example, if you specify ACCESSKEY="P", then the user invokes the key by pressing Alt+P (Windows) or Cmd+P (Mac).

AUTOCOMPLETE = "Yes/No"
Determines whether Internet Explorer 5's AutoComplete feature can save the control's data so that it can be entered automatically the next time the user accesses the form.

Support:

HTML StandardInternet ExplorerNetscape Navigator
Not supported 5.0 and later Not supported

CLASS = "Text"
The style sheet class used by the tag.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later 4.0 and later

Notes:

  • You can specify two or more classes; be sure to separate each class name with a space.

DISABLED
Prevents the user from being able to enter data into the control.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later Not supported

ID = "Text"
An alphanumeric string that uniquely identifies the tag.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later 4.0 and later

Notes:

  • Although you can use letters and numbers for the ID, the first character must be a letter.

LANG = "Text"
The language used by the tag's attribute values and text content.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later Not supported

MAXLENGTH = Positive integer
The maximum number of characters that the user can enter into the control.

Support:

HTML StandardInternet ExplorerNetscape Navigator
2.0 and later 1.0 and later 1.0 and later

NAME = "Text"
The name of the control.

Support:

HTML StandardInternet ExplorerNetscape Navigator
2.0 and later 1.0 and later 1.0 and later

Notes:

  • The NAME attribute enables scripts to work with this control.
  • With the exception of the RADIO control, all form elements must have a unique name.

READONLY
Prevents the user from editing the control.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later Not supported

SIZE = Positive integer
The length of the control.

Support:

HTML StandardInternet ExplorerNetscape Navigator
2.0 and later 1.0 and later 1.0 and later

STYLE = "Text"
The style or styles to use with the tag.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later 4.0 and later

Notes:

  • If you enter multiple style properties, separate each one with a semi-colon (;).

TABINDEX = Positive integer
The control's position with the page's tabbing order.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later Not supported

Notes:

  • The "tabbing order" is the order in which page elements are selected when the user presses the Tab key.

TYPE = "Text"
The type of the INPUT tag.

Support:

HTML StandardInternet ExplorerNetscape Navigator
2.0 and later 1.0 and later 1.0 and later

Notes:

  • Use TYPE=TEXT.

VALUE = "Text"
The initial value assigned to the control.

Support:

HTML StandardInternet ExplorerNetscape Navigator
2.0 and later 1.0 and later 1.0 and later

VCARD_NAME = "Text"
Enter's the user's specified vCard data into the control.

Support:

HTML StandardInternet ExplorerNetscape Navigator
Not supported 5.0 and later Not supported

Notes:

Example:
<FORM ACTION="http://www.mcfedries.com/cgi-win/formtest.exe" METHOD=POST>
First Name: <INPUT TYPE=TEXT NAME="First" >
<P>
Last Name: <INPUT TYPE=TEXT NAME="Last">
<P>
Nickname: <INPUT TYPE=TEXT NAME="Nick">
<P>
Stage Name: <INPUT TYPE=TEXT NAME="Stage">
<P>
<INPUT TYPE=SUBMIT VALUE="Just Do It!">
<INPUT TYPE=RESET VALUE="Just Reset It!">
</FORM>
How It Looks:
First Name:

Last Name:

Nickname:

Stage Name:


| Index | Previous Tag: <INPUT> (SUBMIT) | Next Tag: <INS> |