The Wayback Machine - https://web.archive.org/web/20090912182658/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
Voice Search Faces Hurdles in Mobile
BlackBerry Maker RIM Buys Mobile Browser Firm
Sun, IBM Keep Flying the RISC Flag

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 | Freelance Jobs

webref The latest from WebReference.com Browse >
New Features in ASP.NET Ajax 4.0 · Create a File-based Blog using Jaxer · XML and PHP Simplified - Building an XML Reader
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Tips for Managing Complex Queries · The 10 Best Mobile Business Apps · xG Demonstrates True Mobile VoIP in Pilot Deployment

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.