<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
|
ACCESSKEY | NN n/a IE 4 HTML n/a | ||
ACCESSKEY=" | 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., | |||
Example
<TEXTAREA NAME="notes" ACCESSKEY="n"></TEXTAREA> | |||
Value Single character of the document set. | |||
| |||
Object Model Reference
|
ALIGN | NN n/a IE 4 HTML n/a | ||
ALIGN=" | 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
|
COLS | NN all IE all HTML all | ||
COLS=" | 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. | |||
| |||
Object Model Reference
|
DATAFLD | NN n/a IE 4 HTML n/a | ||
DATAFLD=" | 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. | |||
| |||
Object Model Reference
|
DATASRC | NN n/a IE 4 HTML n/a | ||
DATASRC=" | 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. | |||
| |||
Object Model Reference
|
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. | |||
| |||
Object Model Reference
|
NAME | NN all IE all HTML all | ||||
NAME=" | 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. | |||||
| |||||
Object Model Reference
|
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. | |||
| |||
Object Model Reference
|
ROWS | NN all IE all HTML all | ||
ROWS=" | 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. | |||
| |||
Object Model Reference
|
STYLE | NN n/a IE 4 HTML 4 | ||
STYLE=" | 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 | |||
| |||
Object Model Reference
|
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. | |||
| |||
Object Model Reference
|
WRAP | NN 2 IE 4 HTML n/a | ||||||||||||||||||
WRAP=" | 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 | |||||||||||||||||||
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:
| |||||||||||||||||||
| |||||||||||||||||||
Object Model Reference
|