HTML <textarea> wrap Attribute
Definition and Usage
wrap
The attribute specifies how the text in the text area is line-fed when submitted in a form.
Example
When submitted in a form, the text in the text area that has set wrap="hard" will contain line feed characters (if any):
<textarea rows="2" cols="20" wrap="hard"> At codew3c.com, you will learn how to develop websites. We provide free tutorials for all Web development technologies. </textarea>
Syntax
<textarea wrap="soft|hard">
Attribute Value
Value | Description |
---|---|
soft | When submitted in a form, the text in the text area will not be line-fed. Default. |
hard |
When submitted in a form, the text in the text area will be line-fed (including line feed). Tip:When using "hard", the cols attribute must be specified. |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |