X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR BOOTSTRAP XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML <textarea> wrap Attribute

HTML textarea Tag Reference HTML <textarea> tag

Example

The text in a text area with wrap="hard" will contain newlines (if any) when submitted in a form:

<textarea rows="2" cols="20" wrap="hard">
At W3Schools you will find free Web-building tutorials.
</textarea>

Try it yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The wrap attribute is supported in all major browsers.


Definition and Usage

The wrap attribute specifies how the text in a text area is to be wrapped when submitted in a form.


Differences Between HTML 4.01 and HTML5

The wrap attribute is new for the <textarea> tag in HTML5.


Syntax

<textarea wrap="soft|hard">

Attribute Values

Value Description
soft The text in the textarea is not wrapped when submitted in a form. This is default
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


HTML textarea Tag Reference HTML <textarea> tag

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook