The <textarea> tag defines a multi-line text input control.
Supported In HTML4: Yes
Supported In HTML5: Yes
HTML4 vs HTML5 Differences:
Attributes
| Title | Values | Description | HTML4 Support | HTML5 Support |
| autofocus | autofocus | Makes the textarea focused on page load. | No | Yes |
| cols | number | Specifies the number of characters visible in the text-area. | No | No |
| disabled | disabled | Disables the text-area when it is first displayed. | No | No |
| form | formname | Defines one ore more forms the textarea belongs to. | No | No |
| maxlength | number | Defines the maximum number of characters allowed in the textarea. | No | No |
| name | name of textarea | Specifies a name for the text-area. | No | No |
| placeholder | text | Defines a hint to help users fill out the textarea. | No | No |
| readonly | readonly | Indicates that the user cannot modify the content in the textarea. | No | No |
| required | required | Defines if the textarea's value is required in order to submit the form. | No | No |
| rows | number | Specifies the number of rows visible in the text-area | No | No |
| wrap | hard soft | Specifies how to wrap the textarea's content when submitted. If the value is "hard" then line breaks are added at the "cols" attribute's value. The value "soft" is default, and adds no line breaks. | No | No |
Standard Attributes
All standard attributes are supported.
Event Attributes
All event attributes are supported.
HTML5 Tags
- a
- abbr
- acronym
- address
- applet
- area
- article
- aside
- audio
- b
- base
- basefont
- bdo
- big
- blockquote
- body
- br
- button
- canvas
- caption
- center
- cite
- code
- col
- colgroup
- command
- datalist
- dd
- del
- details
- dfn
- dir
- div