The Wayback Machine - https://web.archive.org/web/20090625193518/http://www.webreference.com:80/html/tutorial13/8.html


spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / html / tutorials / 13 / 8

index123456789101112131415161718192021exercises1

Tutorial 13: Giving Form to Forms

Developer News
Google Going Native With Chrome
Mozilla Fixes Firefox Flaws as 3.5 Release Nears
Microsoft and Novell Still Bosom Buddies

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="text"
 NAME="email"
 VALUE="user@domain.com"
 SIZE="16"
 MAXLENGTH="50"
>
<INPUT TYPE="submit" VALUE="Submit">
</FORM>

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">
</FORM>

Username:
Password:

index123456789101112131415161718192021exercises1

Produced by Stephanos Piperoglou

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info
Copyright 2009 WebMediaBrands Inc. All Rights Reserved.

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Data Filtering with PHP · Theming Your CMS Without Tearing Your Hair Out · Make Prettier URLs with Apache's Mod Rewrite
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Oracle 11g Data Guard: Grid Control Management · Virtualization, Cloud Key in Data Storage Future · Enterprise SBC Market Set to Grow 49 Percent Annually through 2013

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

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.