HTMLTextAreaElement
The interface for <textarea>. Extends HTMLElement → Element.
Reflected properties
All setters are guarded and throw NoModificationAllowedError on a read-only document.
| Property | Attribute | Type | Notes |
|---|---|---|---|
name |
name |
string | Reflects the content attribute verbatim. |
placeholder |
placeholder |
string | Reflects the content attribute verbatim. |
required |
required |
boolean (presence) | Reading reflects whether the attribute is present; writing false removes it, any other value sets it present. |
disabled |
disabled |
boolean (presence) | Reading reflects whether the attribute is present; writing false removes it, any other value sets it present. |
readOnly |
readonly |
boolean (presence) | Reading reflects whether the attribute is present; writing false removes it, any other value sets it present. |
rows |
rows |
number | unset → 2; minimum 1 (an out-of-range value falls back to the default). |
cols |
cols |
number | unset → 20; minimum 1 (an out-of-range value falls back to the default). |
wrap |
wrap |
enum | Keywords: soft · hard. Missing → "soft"; invalid → "soft". |
See also
- Element —
getAttribute/setAttribute, content,classList, traversal, insertion - HTMLElement — the global reflected properties every HTML element inherits
- JavaScript DOM API — the interface hierarchy and
instanceof