The cols attribute specifies
the expected maximum number of characters per line. If the
cols attribute is specified, its value must
be a valid non-negative integer
greater than zero.

The rows attribute specifies
the number of lines to show. If the rows attribute is specified, its value must
be a valid non-negative integer
greater than zero.

The wrap attribute is an
enumerated attribute with two
keywords and states: the soft keyword which
maps to the Soft state, and the hard keyword which
maps to the Hard state. The missing
value default is the Soft state.

The Soft state indicates that the
text in the textarea is not to be wrapped when it
is submitted (though it can still be wrapped in the rendering).

The Hard state indicates that the
text in the textarea is to have newlines added by
the user agent so that the text is wrapped when it is
submitted.

If the element's wrap attribute is in the Hard state, the cols attribute must be specified.

The required attribute is a
boolean attribute. When specified,
the user will be required to enter a value before submitting the
form.

The placeholder
attribute represents a short hint (a word or short phrase)
intended to aid the user with data entry when the control has no
value. A hint could be a sample value or a brief description of the
expected format. The attribute, if specified, must have a value
that contains no "LF" (U+000A) or "CR" (U+000D) characters.

The placeholder attribute should not be
used as an alternative to a label. For a longer hint or other advisory
text, the title attribute is more appropriate.

These mechanisms are very similar but subtly
different: the hint given by the control's label is shown at all times; the short
hint given in the placeholder attribute is shown
before the user enters a value; and the hint in the title attribute is shown when the user
requests further help.

The form attribute is used to explicitly associate
the textarea element with its form owner. The name attribute represents the element's name.
The disabled attribute is used to make the
control non-interactive and to prevent its value from being
submitted. The autofocus attribute controls focus.

textarea . type

Returns the string "textarea".

textarea . value

Returns the current value of the element.

Can be set, to change the value.

Here is an example of a textarea being used for unrestricted
free-form text input in a form:

<p>If you have any comments, please let us know: <textarea cols=80 name=comments></textarea></p>

To specify a maximum length for the comments, one can use the
maxlength attribute:

<p>If you have any short comments, please let us know: <textarea cols=80 name=comments maxlength=200></textarea></p>

To give a default value, text can be included inside the
element:

<p>If you have any comments, please let us know: <textarea cols=80 name=comments>You rock!</textarea></p>