References

Collection of references for web development.

HTML textarea tag

Description

The HTML <textarea> element represents a multi-line text input control.

Attributes

Attribute Value Description
autocomplete on
off
Specifies if form elements should be automatically completed by the browser.
autofocus boolean Specifies if the element should automatically have focus when the document loads.
cols number Specifies the width of the textarea, default is 20.
disabled boolean Specifies whether the element should be disabled or not (user is unable to click or control if disabled).
form ID Specifies the form(s) that the element belongs to.
maxlength number Specifies the maximum number of characters a user can enter.
minlength number Specifies the minimum number of characters a user can enter.
name string Specifies the name of the element.
placeholder string Specifies a hint that describes the expected value.
readonly readonly Specifies if the user can modify the element.
required required Specifies that the elements value is required before submitting the form.
rows number Specifies the number of lines for the element.
spellcheck boolean Specifies if the elements value should have its spelling and grammar checked.
wrap hard
soft
off
Specifies how the control wraps the text.

Example

<textarea>
A textarea
contains
multiple lines
</textarea>