Tutorial 13: Giving Form to Forms - HTML with Style | 21 | WebReference

Tutorial 13: Giving Form to Forms - HTML with Style | 21


Tutorial 13: Giving Form to Forms

Text boxes

Text boxes are controls that allow a user to enter some text. A text box has a TYPE of text. The name of the control is set with the NAME attribute. The default value is set with the VALUE attribute. The size of the control, in characters, can be specified using the SIZE attribute, and the maximum number of characters that can be entered is set using the MAXLENGTH attribute. Here is a simple text box that shows 16 characters, but can accept up to 50:

<FORM ACTION="/cgi-bin/html/formdump.cgi" 
      METHOD="GET" ENCTYPE="application/x-www-form-urlencoded">
<P>Enter e-mail:
<INPUT TYPE="submit" VALUE="Submit">

Enter e-mail:

Password boxes

Password boxes are identical to text boxes, except for the fact that whatever the user types is not displayed in the control. Usually, asterisks (*) are displayed in place of the characters. This type of control can be used to enter passwords and other sensitive information, however remember that although the text the user enters is invisible, it is not encrypted or protected in any other way. Password boxes are have a TYPE of password.

<FORM ACTION="/cgi-bin/html/formdump.cgi"
      METHOD="GET" ENCTYPE="application/x-www-form-urlencoded">
<P>Username: <INPUT TYPE="text" NAME="user" SIZE="8">
<BR>Password: <INPUT TYPE="password" NAME="pass" SIZE="8">
<BR><INPUT TYPE="submit" VALUE="Submit">



Produced by Stephanos Piperoglou

URL: http://www.webreference.com/html/tutorial13/8.html

Created: May 28, 1998
Revised: February 25, 1999