HTML <textarea> wrap Attribute
The wrap attribute specifies how the text in a textarea is to be wrapped when submitted in a form.
Examples
<textarea rows="2" cols="20" wrap="hard">
This text will be wrapped when submitted.
</textarea>
Definition and Usage
The wrap attribute specifies how the text in a text area is to be wrapped when submitted in a form.
Note: The wrap attribute is not supported in all browsers. For example, it is not supported in Internet Explorer 8 and earlier versions.
Browser Support
The numbers in the table specify the first browser version that fully supports the attribute.
| Attribute | ||||
|---|---|---|---|---|
| wrap | Yes | Yes | Yes | Yes |
Syntax
<textarea wrap="hard|soft">
Attribute Values
| Value | Description |
|---|---|
| hard | The text in the textarea is wrapped (contains newlines) when submitted in a form. When "hard" is used, the cols attribute must be specified. |
| soft | Default. The text in the textarea is not wrapped when submitted in a form. |
Related Pages
HTML DOM reference: textarea wrap Property
YouTip