Last updated: 2026-09-12
<textarea>The TEXTAREA Element
A multi-line plain-text input, ideal for comments, messages or code.
| Category | Forms |
|---|---|
| Content Model | Flow content |
| Allowed Parents | Any element that accepts flow content |
| Content Tag | Yes — requires closing </textarea> tag |
| Status | Standard |
📝 Syntax
<textarea name="msg" rows="4" cols="50">Default text</textarea>
⚙️ Attributes
This element supports the global attributes plus the following:
| Attribute | Value | Description |
|---|---|---|
name | Field name sent to the server. | |
rows | Number of visible rows. | |
cols | Number of visible columns (width). | |
placeholder | Hint shown when empty. | |
required | Must be filled before submit. | |
maxlength | Maximum number of characters. | |
readonly | Read-only, not editable. | |
disabled | Disables the field. | |
wrap | Wrapping: soft or hard. |
▶ Example
Edit the code below and see the live result in the playground:
🌐 Browser Support
| Browser | |||||
|---|---|---|---|---|---|
| <textarea> | ✓ v1 | ✓ v12 | ✓ v1 | ✓ v1 | ✓ v1 |
| Supported in all major browsers | |||||
Tip: The default value goes between the tags, not in a value attribute.
🏷️ Related Tags
💡 Related Cases
More case studies coming soon — check back later.