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


spacer

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

home / experts / html / tutorials / 13 / 14

index123456789101112131415161718192021exercises1

Tutorial 13: Giving Form to Forms

Developer News
SpringSource, Hyperic Merge for App Management
Get Ready for Windows 7 'Release Candidate'
PHP Speeds to the Cloud With Zend Framework 1.8

Multi-line text boxes with the TEXTAREA element

Another element that is used to create form controls is the TEXTAREA element, which is very similar to an INPUT element with TYPE="text", with the exception that TEXTAREA elements define multi-line text boxes.

The TEXTAREA element

Context:
Can only appear inside a FORM element
Contents:
Can only contain text, and no other elements. The contents of the element form its default value
Tags:
Both start-tag and end-tag are required.

Attributes for the TEXTAREA element

NAME (Name)
The name that will be used for the name/value pair that the control creates.
ROWS (Integer)
The number of rows of text that the control can display at one time.
COLS (Integer)
The number of columns of text that the control can display at one time.
Read-only control attribute
Disabled control attribute
Identifier and classification attributes
Language information attributes
Title attribute
Inline style information attribute
Text alignment attribute
Tabbing navigation attribute
Accessibility key attribute
Intrinsic event handler attributes
<FORM ACTION="/cgi-bin/html/formdump.cgi" 
      METHOD="GET" ENCTYPE="application/x-www-form-urlencoded">
<TEXTAREA NAME="comments" ROWS="5" COLS="40">
This is a text area with 5 rows and 40
columns visible by default. The text
inside the element is its default value.
Although the control is limited in size,
the text entered can be larger than this
size, and the user agent will presumably
offer a scrolling mechanism for it.
</TEXTAREA>
<INPUT TYPE="submit">
</FORM>

The TEXTAREA element is very similar to a normal text box. It takes its name from the NAME attribute, its initial value from its contents and its final value from whatever the user types into the text box. You can also set the size of the text box using the ROWS and COLS attributes.

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

webref The latest from WebReference.com Browse >
Debugging JavaScript: Handling Runtime Exceptions · Basic Authentication with Apache · CMS: A Look Back and The Way Ahead
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Win Server 2008: Active Directory Interface Improvements · Nimbuzz Connects the Walled Gardens · Feds Consider Overhaul of Cyber-defense Ops

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

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

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