Description:

The HTML <textarea> tag is used within a form to declare a textarea element - a control that allows the user to input text over multiple rows.

Example Code:
<textarea cols="40">
You can write whatever text you want in the textarea.
</textarea>
Result:
Attributes:
Attribute Definition
autofocus Specifies that a text area should automatically get focus when the page loads
cols Specifies the width of the textarea based on the number of visible character widths.
dirname Specifies that the text direction of the textarea will be submitted
disabled Disables the input control. The button won't accept changes from the user. It also cannot receive focus and will be skipped when tabbing.
form Specifies one or more forms the text area belongs to
maxlength Specifies the maximum number of characters allowed in the text area
name Assigns a name to the input control.
placeholder Specifies a short hint that describes the expected value of a text area
readonly Sets the textarea to read-only - it won't allow the user to change the value. The textarea however, can receive focus and is included when tabbing through the form controls.
required Specifies that a text area is required/must be filled out
rows Specifies the height of the textarea based on the number of visible lines of text. If there's more text than this allows, users can scroll using the textarea's scrollbars.
wrap Specifies how the text in a text area is to be wrapped when submitted in a form
Global Attributes:

The <textarea> tag also supports the Global Attributes in HTML5

Event Attributes:

The <textarea> tag also supports the Event Attributes in HTML5



Last updated on 2 August 2018 By Rene Spronk

View All HTML Tags

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.