"> " />
Easy Tutorial
❮ Att Col Charoff Att Area Coords ❯

HTML <textarea> wrap Attribute

HTML <textarea> Tag

Example

A text area with wrap="hard" will include line breaks (if any) when the form is submitted:

<textarea rows="2" cols="20" wrap="hard">
tutorialpro.org provides the most comprehensive web technology tutorials.
</textarea>

Browser Support

All major browsers support the 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.


Differences Between HTML 4.01 and HTML5

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


Syntax

Attribute Values

Value Description
soft Default. The text is wrapped visually at the element's max-width, but no line breaks are automatically inserted, meaning no line breaks are included when the form is submitted.
hard The browser automatically inserts line breaks (CR+LF) when the text reaches the element's max-width. Line breaks are also included when the form is submitted. When using "hard", the cols attribute must be specified.

HTML <textarea> Tag

❮ Att Col Charoff Att Area Coords ❯