The textarea element represents a multi-line plain-text edit control for the element's raw value.


<textarea attribute-name="attribute-value"></textarea>
Name Value Description
autofocus autofocus | empty Specifies that the element represents a control to which a UA is meant to give focus as soon as the document is loaded - HTML5
cols positive integer Expected maximum number of characters per line of text for the UA to show
dirname string Enables submission of a value for the directionality of the element, and gives the name of the field that contains that value
disabled disabled | empty Specifies that the element represents a disabled control
form IDREF Identifies a form with which to associate the element - HTML5
maxlength positive integer Maximum allowed value length of the element
name string Name part of the name/value pair associated with this element for the purposes of form submission
placeholder string Short hint (one word or a short phrase) intended to aid the user when entering data into the control represented by its element - HTML5
readonly readonly | empty Specifies that element represents a control whose value is not meant to be edited
required required | empty Specifies that the element is a required part of form submission - HTML5
rows positive integer Number of lines of text for the UA to show
wrap hard | Instructs the UA to insert line breaks into the submitted value of the textarea such that each line has no more characters than the value specified by the cols attribute
soft Instructs the UA to add no line breaks to the submitted value of the textarea


Example | autofocus

Example | cols

Example | dirname

Example | disabled

Example | form

Example | maxlength

Example | name

Example | placeholder

Example | readonly

Example | required

Example | rows

Example | wrap


W3C HTML 4.01 Specification


W3C HTML 5.1