English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

Complete list of HTML tags

HTML: <textarea> wrap attribute

HTML: <textarea> wrap attribute specifies how the text in the text area is wrapped when the form is submitted, an online instance demonstrates how to use the <textarea> wrap attribute, browser compatibility, syntax definition, and detailed information about its attribute values, etc.

 HTML <textarea> tag

Online example

When the form is submitted, the text area with wrap = 'hard' will include newline characters (if any):

<textarea rows="4" cols="30" wrap="hard">
oldtoolbag.com provides various basic web technology tutorials. 
</textarea>
Test it out ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the wrap attribute.

Definition and Usage

The wrap attribute specifies how the text in the text area is wrapped when submitting a form.

HTML 4.01 with HTML5difference

The wrap attribute is an HTML5 is a new attribute of the <textarea> tag in HTML.

Syntax

<textarea wrap="soft|hard">

Attribute Value

ValueDescription
softWhen submitting a form, the text in the textarea is not wrapped. Default.
hardWhen submitting a form, the text in the textarea is wrapped (including newline characters). When using "hard", the cols attribute must be specified.
 HTML <textarea> tag