You are here: Reference > HTML > attributes > wrap (textarea)

wrap attribute (textarea)

Browser support:
Specifies the word wrapping behavior.
To manipulate word wrapping rules in other elements see the links of the related section below.
JavaScript page for this attribute: wrap. You can find other example(s) there.

Possible values:

String that sets the type of word wrapping.
One of the following values:
hard
Word wrapping is enabled and the submitted text (if the textarea element is in a form element) will contain the inserted line break characters, too.
off
Word wrapping is disabled.
soft
Default. Word wrapping is enabled but the submitted text (if the textarea element is in a form element) will not contain the inserted line break characters.
Default: soft.

Example HTML code 1:

This example illustrates the use of the wrap attribute:
<textarea rows="10" cols="10" wrap="off" style="width:300px">
    The wrap flag is off for this field therefore this line may not be wrapped.
</textarea>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content