Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

HTML wrap Attribute


Definition and Usage

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


Applies to

The wrap attribute can be used on the following element:

Element Attribute
<textarea> wrap

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

Attribute
wrap Yes Yes Yes Yes Yes