HTML Form - Text Input Control
- Authors may create two types of controls that allow users to input text.
The INPUT element creates a single-line input control and the
TEXTAREA
element creates a multi-line input control.
In both cases, the input text becomes the control's current value.
Attributes:
-
- NAME="text"
- This assigns a label to the text submitted by the user, thus identifying
what the user was responding to when they filled in the text box.
-
- VALUE="text"
- Specify some default text for the text box
-
- SIZE=value
- Specify the width of the text box in characters.
-
- MAXLENGTH=value
- Specify the maximum number of characters that can be written in the text box.
If this is greater than can be displayed (as defined by the SIZE attribute,
then the field will scroll.
Just one line of text please:
<INPUT TYPE="text" NAME="My Single-Line Text Box" SIZE=50 MAXLENGTH=75 VALUE="default text">
Copyright © 1994-2002
World Wide Web Consortium
All Rights Reserved.
And
©1997-8 Richard Rutter
previous slide |
next slide
Return to Beginning of Presentation
Return to Software Development Library