Web development

HTML wrap Attribute

HTML wrap Attribute

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

The HTML wrap attribute can be used on the <textarea> element.


<textarea wrap="soft|hard"> 

hard – the text in the textarea will be wrapped when submitting the form.

soft (default) – the text present in the textarea would not be wrapped after submitting the form.


<!DOCTYPE html>

<form action="">
<textarea rows="3" cols="25" name="text" wrap="hard">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam elementum justo at purus congue ultrices. In lectus orci, bibendum a cursus sed, ultricies ac neque.  
<input type="submit">



Enjoy coding!

Read also:

HTML accesskey Attribute

HTML dir Attribute

HTML translate Attribute