<TEXTAREA> | NN all IE all HTML all
<TEXTAREA>...</TEXTAREA> | End Tag: Required
The TEXTAREA element is a multiline text input control primarily for usage inside FORM elements (required in Navigator). Unlike the text type INPUT element, a TEXTAREA element can be sized to accept more than one line of text. Word-wrapping is available on more recent browsers, and users may enter carriage return characters (a combination of characters ASCII decimal 13 and 10) inside the text box. When a TEXTAREA element is inside a submitted form, the name/value pair is submitted, with the value being the content of the text box (and the NAME attribute must be assigned). The CGI program on the server must be able to handle the possibility of carriage returns in the text data. If you wish to display text in the TEXTAREA element when it loads, that text goes between the start and end tags; otherwise, there are no intervening characters in the source code between start and end tags. A label for the TEXTAREA element must be placed before or after the element, and may, optionally in newer browsers, be encased in a LABEL element for structural purposes.
Example
    <TEXTAREA ROWS=5 COLS=60 NAME="notes">Use this area for extra notes.
    </TEXTAREA>
Object Model Reference
NN | [window.]document.formName.elementName [window.]document.forms[i].elements[i]
IE | [window.]document.formName.elementName [window.]document.forms[i].elements[i] [window.]document.all.elementID

ACCESSKEY | NN n/a IE 4 HTML n/a
ACCESSKEY="character" | Optional
A single character key that brings focus to the element. The browser and operating system determine if the user must press a modifier key (e.g., Ctrl, Alt, or Command) with the access key to bring focus to the element. In IE 4/Windows, the Alt key is required, and the key is not case sensitive. This attribute does not work in IE 4/Mac. That this attribute is missing from the HTML 4.0 specification appears to be an oversight.
Example
    <TEXTAREA NAME="notes" ACCESSKEY="n"></TEXTAREA>
Value Single character of the document set.
Default | None.
Object Model Reference
IE | [window.]document.formName.elementName.accessKey [window.]document.forms[i].elements[i].accessKey [window.]document.all.elementID.accessKey

ALIGN | NN n/a IE 4 HTML n/a
ALIGN="alignmentConstant" | Optional
Determines how the rectangle of the element aligns within the context of surrounding content. See the section "Alignment Constants" earlier in this chapter for a description of the possibilities defined in both Navigator and Internet Explorer for this attribute. Despite Microsoft's advertised extensive support for this attribute, only some values work on Internet Explorer 4 for the Macintosh; none work on the Windows version. Use style sheets to position this element if you need to. Default alignment also varies with operating system.
Object Model Reference
IE | [window.]document.formName.elementName.align [window.]document.forms[i].elements[i].align [window.]document.all.elementID.align

COLS | NN all IE all HTML all
COLS="columnCount" | Optional
The width of the editable space of the TEXTAREA element. The value represents the number of monofont characters that are to be displayed within the width. When the font size can be influenced by style sheets, the actual width changes accordingly.
Example
    <TEXTAREA COLS=40></TEXTAREA>
Value Any positive integer.
Default | Varies with browser and operating system.
Object Model Reference
IE | [window.]document.formName.elementName.cols [window.]document.forms[i].elements[i].cols [window.]document.all.elementID.cols

DATAFLD | NN n/a IE 4 HTML n/a
DATAFLD="columnName" | Optional
Used with IE 4 data binding to associate a remote data source column name with the content of the TEXTAREA element. A DATASRC attribute must also be set for the element.
Example
    <TEXTAREA NAME="summary" DATASRC="#DBSRC3" DATAFLD="summary">
Value Case-sensitive identifier.
Default | None.
Object Model Reference
IE | [window.]document.formName.elementName.dataFld [window.]document.forms[i].elements[i].dataFld [window.]document.all.elementID.dataFld

DATASRC | NN n/a IE 4 HTML n/a
DATASRC="dataSourceName" | Optional
Used with IE 4 data binding to specify the name of the remote ODBC data source (such as an Oracle or SQL Server database) to be associated with the element. Content from the data source is specified via the DATAFLD attribute.
Example
    <TEXTAREA NAME="summary" DATASRC="#DBSRC3" DATAFLD="summary">
Value Case-sensitive identifier.
Default | None.
Object Model Reference
IE | [window.]document.formName.elementName.dataSrc [window.]document.forms[i].elements[i].dataSrc [window.]document.all.elementID.dataSrc

DISABLED | NN n/a IE 4 HTML 4
DISABLED | Optional
A disabled TEXTAREA element cannot be activated by the user. In Windows, a disabled TEXTAREA cannot receive focus and does not become active within the tabbing order rotation. HTML 4.0 also specifies that the name/value pair of a disabled element should not be sent when the form is submitted. The DISABLED attribute is a Boolean type, which means that its presence in the attribute sets its value to true. Its value can also be adjusted after the fact by scripting (see the textarea object in ).
Example
    <TEXTAREA DISABLED></TEXTAREA>
Value The presence of the attribute disables the element.
Default | false
Object Model Reference
IE | [window.]document.formName.elementName.disabled [window.]document.forms[i].elements[i].disabled [window.]document.all.elementID.disabled

NAME | NN all IE all HTML all
NAME="elementIdentifier" | Optional
If the TEXTAREA element is part of a form being submitted to a server, the NAME attribute is required if the value of the element is to be submitted with the form. For forms that are in documents for the convenience of scripted form elements, TEXTAREA element names are not required but are helpful just the same in creating scripted references to these objects and their properties or methods.
Example
    <TEXTAREA NAME="comments"></TEXTAREA>
Value Case-sensitive identifier.
Default | None.
Object Model Reference
NN | [window.]document.formName.elementName.name [window.]document.forms[i].elements[i].name
IE | [window.]document.formName.elementName.name [window.]document.forms[i].elements[i].name [window.]document.all.elementID.name

READONLY | NN n/a IE 4 HTML 4
READONLY | Optional
When the READONLY attribute is present, the TEXTAREA element cannot be edited on the page by the user (although scripts can modify the content). A TEXTAREA marked as READONLY should not receive focus within the tabbing order (although IE 4 for the Macintosh allows the field to receive focus).
Example
    <TEXTAREA NAME="instructions" READONLY></TEXTAREA>
Value The presence of the attribute sets its value to true.
Default | false
Object Model Reference
IE | [window.]document.formName.elementName.readOnly [window.]document.forms[i].elements[i].readOnly [window.]document.all.elementID.readOnly

ROWS | NN all IE all HTML all
ROWS="rowCount" | Optional
The height of the TEXTAREA element based on the number of lines of text that are to be displayed without scrolling. The value represents the number of monofont character lines that are to be displayed within the height before the scrollbar becomes active. When the font size can be influenced by style sheets, the actual height changes accordingly.
Example
    <TEXTAREA ROWS=5 COLS=40></TEXTAREA>
Value Any positive integer.
Default | Varies with browser and operating system.
Object Model Reference
IE | [window.]document.formName.elementName.rows [window.]document.forms[i].elements[i].rows [window.]document.all.elementID.rows

STYLE | NN n/a IE 4 HTML 4
STYLE="styleSheetProperties" | Optional
This attribute lets you set one or more style sheet rule property assignments for the current element. The format of the property assignments depends on the browser's default style, but both Navigator and Internet Explorer accept the CSS syntax. Style sheet rules influence this element in Internet Explorer 4 for the Macintosh more than they do the Windows version. You may wish to wait for improved (and cross-browser) implementation before setting styles of TEXTAREA elements.
Example
    <TEXTAREA STYLE="text-size:14pt"></TEXTAREA>
Value An entire CSS-syntax style sheet rule is enclosed in quotes. Multiple style attribute settings are separated by semicolons. Style sheet attributes are detailed in .
Default | None.
Object Model Reference
IE | [window.]document.formName.elementName.style [window.]document.forms[i].elements[i].style [window.]document.all.elementID.style

TABINDEX | NN n/a IE 4 HTML 4
TABINDEX=integer | Optional
A number that indicates the sequence of this element within the tabbing order of all focusable elements in the document. Tabbing order follows a strict set of rules. Elements that have values other than zero assigned to their TABINDEX attributes are first in line when a user starts tabbing in a page. Focus starts with the element with the lowest TABINDEX value and proceeds in order to the highest value, regardless of physical location on the page or in the document. If two elements have the same TABINDEX values, the element that comes earlier in the document receives focus first. Next come all elements that either don't support the TABINDEX attribute or have the value set to zero. These elements receive focus in the order in which they appear in the document.
Example
    <TEXTAREA NAME="comments" TABINDEX=3></TEXTAREA>
Value Any integer from through 32767. In IE 4, setting the TABINDEX to -1 causes the element to be skipped in tabbing order altogether.
Default | None.
Object Model Reference
IE | [window.]document.formName.elementName.tabIndex [window.]document.forms[i].elements[i].tabIndex [window.]document.all.elementID.tabIndex

WRAP | NN 2 IE 4 HTML n/a
WRAP="wrapType" | Required
The WRAP attribute tells the browser whether it should wrap text in a TEXTAREA element and whether wrapped text should be submitted to the server with soft returns converted to hard carriage returns. Navigator and Internet Explorer don't agree fully on the possible values, and the HTML specification is silent on the subject. Even so, there are cross-browser solutions. If WRAP is turned off (the default), the TEXTAREA element activates the horizontal scrollbar as characters exceed the original column width. A press of the Return/Enter key causes the cursor to advance to the next line back at the left margin. To submit the content without the word-wrapped soft returns converted to hard carriage returns (in other words, submitted as typed), set the WRAP attribute by including the attribute like a Boolean value. To convert the soft returns to hard carriage returns (and thus preserving the word-wrapped formatting in the submitted content), set the value of WRAP to hard. Both Navigator and Internet Explorer recognize this setting, whereas Navigator does not recognize IE's value of physical.
Example
    <TEXTAREA NAME="comments" WRAP></TEXTAREA>
Value The presence of the WRAP attribute (without any assigned value) engages word wrapping (and filters soft returns before being submitted). A value of hard also engages word wrapping and converts soft returns to CR-LF characters in the value submitted to the server. A value of off or no attribute turns word wrapping off. Recognized values are as follows:
Value | NN | IE
    hard
| * | *
    off
| * | *
    physical
| - | *
    soft
| * | -
    virtual
| - | *
Default | off
Object Model Reference
IE | [window.]document.formName.elementName.wrap [window.]document.forms[i].elements[i].wrap [window.]document.all.elementID.wrap