W3 3.2y
4.0y
NS 3.0y
4.0y
IE 3.0y
4.0y
TV 1.2y
2.1y

<TEXTAREA>...</TEXTAREA>

Description

Define a multiline text field in a form. The user can enter text inside this field. There is no limit on the number of characters a user can enter. The text that is inside this container will be used as the default text.

This element is only valid inside the FORM element.

DTD

<!ELEMENT TEXTAREA - - (#PCDATA)       -- multi-line text field -->
<!ATTLIST TEXTAREA
  %attrs;                              -- %coreattrs, %i18n, %events --
  name        CDATA          #IMPLIED
  rows        NUMBER         #REQUIRED
  cols        NUMBER         #REQUIRED
  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
  readonly    (readonly)     #IMPLIED
  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
  accesskey   %Character;    #IMPLIED  -- accessibility key character --
  onfocus     %Script;       #IMPLIED  -- the element got the focus --
  onblur      %Script;       #IMPLIED  -- the element lost the focus --
  onselect    %Script;       #IMPLIED  -- some text was selected --
  onchange    %Script;       #IMPLIED  -- the element value was changed --
  >
from the HTML 4.0 DTD, "Copyright © W3C, (MIT, INRIA, Keio). All Rights Reserved."

Attributes

Core attributes: class id style title
Internationalization attributes: dir lang
Events: onclick ondblclick onmousedown onmouseup onmouseover onmousemove onmouseout onkeypress onkeydown onkeyup

W3 3.2n
4.0y
NS 3.0n
4.0n
IE 3.0n
4.0n
TV 1.2n
2.1n
ACCESSKEY
Description of the accesskey attribute
W3 3.2n
4.0n
NS 3.0n
4.0n
IE 3.0n
4.0n
TV 1.2y
2.1n
ALLCAPS
Use the allcaps attribute to set the caps mode for the on-screen keyboard so that text the viewer types defaults to capital letters.
W3 3.2n
4.0n
NS 3.0n
4.0n
IE 3.0n
4.0n
TV 1.2y
2.1n
AUTOACTIVATE
Use the autoactivate attribute to activate the text area automatically when the viewer selects it. The WebTV interface draws the cursor in the activated text area.

When the autoactivate attribute is not specified for a text area, the viewer must press the GO button on the remote control (or Return on a keyboard) to activate the text area for typing. Also, when autoactivate is not specified, the arrow buttons on the remote control move the Highlight rectangle to the next selectable item on the Web page.

When the autoactivate attribute is specified for a text area or when the viewer has activated the area, the viewer can type in the text area and use the arrows to move the text cursor within the area.


W3 3.2n
4.0n
NS 3.0n
4.0n
IE 3.0n
4.0n
TV 1.2y
2.1n
AUTOCAPS
Use the autocaps attribute so that the first letter of each word that the viewer types with the on-screen keyboard is a capital letter. You can use the autocaps attribute on text areas used for proper names and addresses.
W3 3.2n
4.0n
NS 3.0n
4.0n
IE 3.0n
4.0n
TV 1.2y
2.1y
BGCOLOR
Use the bgcolor attribute to set the background color for the text area. The WebTV HTML interface accepts color values in either #rrggbb or color name format. The default value for bgcolor is #eaeaea.
See the page Using colors for a description on specifying colors.
W3 3.2y
4.0y
NS 3.0y
4.0y
IE 3.0y
4.0y
TV 1.2n
2.1y
COLS
Set the number of columns the text window will occupy on the screen.
W3 3.2n
4.0n
NS 3.0n
4.0n
IE 3.0n
4.0y
TV 1.2y
2.1y
CURSOR
Use the cursor attribute to set the color for the cursor in the text area. The WebTV HTML interface accepts color values in either #rrggbb or color name format. The default value for the cursor is dark blue (#3333aa), though many pages override this value with yellow.
See the page Using colors for a description on specifying colors.
W3 3.2n
4.0y
NS 3.0n
4.0n
IE 3.0n
4.0y
TV 1.2n
2.1n
DISABLED
This attribute makes the text field non-functional, so that the user can't enter text in it.

The differences between disabled fields and readonly fields
function Readonly fields Disabled fields
Getting focus can receive focus cannot receive focus
Tabbing order included in the tabbing order skipped from the tabbing order
Successful controls can be successful cannot be successful


W3 3.2n
4.0n
NS 3.0n
4.0n
IE 3.0n
4.0n
TV 1.2y
2.1n
GROWABLE
Use the growable attribute to allow the text area to expand vertically as the viewer types beyond its original boundary.
W3 3.2y
4.0y
NS 3.0y
4.0y
IE 3.0y
4.0y
TV 1.2n
2.1y
NAME
The name of the element inside the form. The name is sent to the server to identify the field.
W3 3.2n
4.0n
NS 3.0n
4.0n
IE 3.0n
4.0n
TV 1.2y
2.1n
NOHARDBREAKS
Use the nohardbreaks attribute to prevent the viewer from entering hard breaks in the text area. When the viewer does type a Return, the selection simply moves to the next field.
W3 3.2n
4.0n
NS 3.0n
4.0n
IE 3.0n
4.0n
TV 1.2y
2.1n
NOSOFTBREAKS
Use the nosoftbreaks attribute to prevent the WebTV interface from sending soft breaks when the form is submitted. Soft breaks are inserted in the text for linewrapping in text areas.
W3 3.2n
4.0n
NS 3.0n
4.0n
IE 3.0n
4.0n
TV 1.2y
2.1n
NUMBERS
Use the numbers attribute so that when the WebTV interface displays the on-screen keyboard, the 1 key is selected. This reduces the time the viewer spends to move the Highlight rectangle to the numeric keypad of the on-screen keyboard.
W3 3.2n
4.0y
NS 3.0y
4.0y
IE 3.0n
4.0y
TV 1.2y
2.1y
ONBLUR
Defines JavaScript code to execute when the textarea element loses focus.
W3 3.2n
4.0y
NS 3.0y
4.0y
IE 3.0n
4.0y
TV 1.2y
2.1y
ONCHANGE
Defines JavaScript code to execute when the textarea element loses focus and its value is changed.
W3 3.2n
4.0y
NS 3.0y
4.0y
IE 3.0n
4.0y
TV 1.2y
2.1y
ONFOCUS
Defines JavaScript code to execute when the user selects the textarea element or tabs to it.
W3 3.2n
4.0y
NS 3.0n
4.0n
IE 3.0n
4.0y
TV 1.2y
2.1n
ONSELECT
Defines JavaScript code to execute when the user selects some of the text in the textarea element.
W3 3.2n
4.0y
NS 3.0n
4.0n
IE 3.0n
4.0y
TV 1.2n
2.1n
READONLY
This makes it impossible for the user to change the value of the field.

The differences between disabled fields and readonly fields
function Readonly fields Disabled fields
Getting focus can receive focus cannot receive focus
Tabbing order included in the tabbing order skipped from the tabbing order
Successful controls can be successful cannot be successful


W3 3.2y
4.0y
NS 3.0y
4.0y
IE 3.0y
4.0y
TV 1.2y
2.1y
ROWS
Set the number of rows the text window will show on the screen.
W3 3.2n
4.0n
NS 3.0n
4.0n
IE 3.0n
4.0n
TV 1.2y
2.1n
SHOWKEYBOARD
Use the showkeyboard attribute to show the keyboard automatically when the viewer selects the text area.
W3 3.2n
4.0y
NS 3.0n
4.0n
IE 3.0n
4.0y
TV 1.2n
2.1n
TABINDEX
Description of the TABINDEX attribute
W3 3.2n
4.0n
NS 3.0n
4.0n
IE 3.0n
4.0n
TV 1.2y
2.1y
USESTYLE
Use the usestyle attribute so that the text in the text area is rendered in the current style in effect for the page.
W3 3.2n
4.0n
NS 3.0y
4.0y
IE 3.0y
4.0y
TV 1.2n
2.1n
WRAP
Determines how text will wrap onscreen and how the data is send to the server.

Value Description
OFF Wrapping doesn't happen. Lines are sent exactly as typed.
HARD The display word-wraps, and the text is transmitted at all wrap points.
PHYSICAL The display word-wraps, and the text is transmitted at all wrap points.
SOFT The display word-wraps, but long lines are sent as one line without new-lines.
VIRTUAL The display word-wraps, but long lines are sent as one line without new-lines.

The default setting is OFF.

Examples

Source
<FORM>
<TABLE>
<TR>
<TD>Article number</TD>
<TD><INPUT type="text"></TD>
</TR>
<TR>
<TD valign="top">Description</TD>
<TD><TEXTAREA cols="40" rows="10">
Enter the description here</TEXTAREA></TD>
</TR>
</TABLE>
</FORM>
 
Result
Article number
Description
Statistics