Geek's Portal For Computers Graphics Operating Systems Multi-Media Networking Programming Data Format and  News
[ Start Page ] [ Contacting ] [ About ] [ Link To Us ] [ Geek Gear ] Thu, May 23 2013 
Free Internet Tools by web-geek.com Internet Tools
Administrator Tools
Name Server Look Up
Ping Test
Who Is
Trace Route

Web Developer Tools
Web Safe Colors
HTML Character Map
PopUp Generator
Body Color CSS v1.0
Browser Information
Meta Tag Generator
Keywords Generator
Link Popularity
JavaScript Escape / Unescape Converter
JavaScript Drop Down Menu Builder
Web / Virtual Hosting Directory

Reference Documention
HTML 4.0 Reference

Reference Tables
Character Conversion Table
Domain Name Suffixes

Cheat Sheets
Vi / Vim Basic Commands


WEB-GEEK.COM's Feature Sites Feature Sites
oGobogo Internet Search Directory
News.web-geek.com Internet News Directory
Pdawebgeek.com PDA Friendly Web Directory
Games.web-geek.com Free Online Games


folder HTML 4.0

TEXTAREA - Multi-line Text Input

Syntax <TEXTAREA>...</TEXTAREA>
Attribute Specifications
  • NAME=CDATA (key in submitted form)
  • ROWS=Number (number of rows)
  • COLS=Number (number of columns)
  • DISABLED (disable element)
  • READONLY (prevent changes)
  • ACCESSKEY=Character (shortcut key)
  • TABINDEX=Number (position in tabbing order)
  • ONFOCUS=Script (element received focus)
  • ONBLUR=Script (element lost focus)
  • ONSELECT=Script (element text selected)
  • ONCHANGE=Script (element value changed)
  • common attributes
Contents Plain text (including entities)
Contained in Block-level elements, inline elements except BUTTON

The TEXTAREA element defines a form control for the user to enter multi-line text input. While TEXTAREA is most useful within a FORM, HTML 4.0 allows TEXTAREA in any block-level or inline element other than BUTTON. However, Netscape Navigator will not display any TEXTAREA elements outside of a FORM.

The initial value of the TEXTAREA is provided as the content of the element and must not contain any HTML tags. When a form is submitted, the current value of any TEXTAREA element within the FORM is sent to the server as a name/value pair. The TEXTAREA element's NAME attribute provides the name used.

The required ROWS and COLS attributes specify the number of visible rows and columns, respectively, in a visual browser. These attributes provide a guide for the user rather than a restriction; browsers allow an unlimited amount of text input in theory, though in practice many browsers limit the contents of a TEXTAREA to 32 or 64 kilobytes. Author restrictions on the amount of data entered should be enforced by the CGI script or Java servlet handling the form.

The boolean READONLY attribute, new in HTML 4.0 and poorly supported by current browsers, prevents the user from editing the content of the TEXTAREA. Read-only elements are still submitted with the form. The DISABLED attribute, also poorly supported, disables the TEXTAREA. Disabled elements are read-only elements with the added restrictions that the values are not submitted with the form, the elements cannot receive focus, and the elements are skipped when navigating the document by tabbing.

The ACCESSKEY attribute specifies a single Unicode character as a shortcut key for giving focus to the TEXTAREA. Authors can set the access key on the TEXTAREA element or the LABEL element associated with it. Entities (e.g. &eacute;) may be used as the ACCESSKEY value.

The TABINDEX attribute specifies a number between 0 and 32767 to indicate the tabbing order of the element. A TEXTAREA with TABINDEX=0 or no TABINDEX attribute will be visited after any elements with a positive TABINDEX. Among positive TABINDEX values, the lower number receives focus first. In the case of a tie, the element appearing first in the HTML document takes precedence.

The TEXTAREA element also takes a number of attributes to specify client-side scripting actions for various events. In addition to the core events common to most elements, TEXTAREA accepts the following event attributes:

  • ONFOCUS, when the element receives focus;
  • ONBLUR, when the element loses focus;
  • ONSELECT, when text in the element is selected;
  • ONCHANGE, when the element loses focus and its value has changed since it received focus.

More Information

Copyright © 1998 by Liam Quinn. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/).


Sponsor Sponsor


  © 1999-2006, web-geek.com a Geek Boy Enterprises, Inc. website terms and conditions of use [ Start Page ] [ Contacting ] [ About ] [ Link To US ]