HOME BACK NEXT MENU

 Tag Description:

-==--==--==--==--==-

<INPUT> Form Input

Definition: INPUT is an element used for a variety of entry field types with HTML fill-out forms. The type of field is determined by the TYPE attribute.

Standard Attributes: CLASS, ID, LANG, SRC, MD

Attributes:

TYPE

TYPE is responsible for defining the type of field. Types include: HIDDEN, SUBMIT, TEXT, RANGE, FILE, PASSWORD, CHECKBOX, RADIO, SCRIBBLE, IMAGE or RESET. TYPE defaults to TEXT, and its attribute value is a case-insensitive SGML name token.

NAME

When submitting the form's data, NAME provides the character string that is used to name the field. It is possible that several fields may share the same name, which is case-insensitive.

VALUE

VALUE is a number or character string that is used to initialize hidden fields, range, and text.

DISABLED

When DISABLED is present, the field cannot be modified by the user, although it should be rendered as normal regardless. Wherever the field is disabled, the rendering should ideally provide a clue to this state (by changing the background color, for example).

ERROR

ERROR specifies an error message that explains why the field's current value registers as incorrect. The field can be assumed to be OK when this attribute is not present. It is recommended that user agents provide a cue indicating that the field is in error.

CHECKED

When CHECKED is present, it indicates that a checkbox or radio button should be initialized to its selected state.

SIZE

SIZE specifies what a password field or text's visible width is. In the case of variable pitch fonts, SIZE specifies the width in en units (one-half the point size), while for fixed pitch fonts, the size attribute specifies the maximum number of visible characters.

MAXLENGTH

MAXLENGTH specifies the maximum number of characters that are permitted for password fields and text.

MIN

Either an integer or real number, MIN specifies the lower bound for a range field.

MAX

Either an integer or real number, MAX specifies the upper bound for a range field.

ACCEPT

ACCEPT is a list of MIME content types, separated by commas. It is used to restrict the types of files that you can attach to a form with a file field.

ALIGN

ALIGN applies only to fields that contain background images such as SUBMIT, SCRIBBLE, or IMAGE. Its use is intended to give you the same positional control as you would find with the IMG element. ALIGN can take values TOP or MIDDLE or BOTTOM. It thereby indicates which part of the graphic should be aligned with the baseline for the text line containing the IMG element.

ALIGN=LEFT will make the field float down and over into the current left margin, and any subsequent text will wrap around the field's right hand side. Similarly, ALIGN=RIGHT will make the field align with the right margin and wrap text around the left.

Context: <INPUT> is legal within

<FORM>

The following markup can be used within <INPUT>: None

Suggested style/usage: Close Tag: OPTIONAL

Examples: See Chapter 10 for a forms example.

-==--==--==--==--==-
HOME BACK NEXT MENU

E-Mail: HTML for Dummies at html4dum@lanw.com
URL: http://www.lanw.com/html4dum/h4d2e/t0043.htm
Text - Copyright © 1995, 1996 Ed Tittel & Steve James.
For Dummies, the Dummies Man logo and Dummies Press are trademarks or registered trademarks of Wiley Publishing, Inc. Used with Permission.
Web Layout - Copyright © 1996, LANWrights
Revised -- May, 2002 [MCB]