Open In App
Related Articles

HTML | wrap Attribute

Improve Article
Save Article
Like Article

The wrap attribute is used to specify that in which manner the text is to be wrapped in a text area when a form is submitted
The wrap attribute can be applied on the <textarea> element:

Supported Tags: 

Attribute Values:

  • soft:  This is a default value. It specifies that the Text present in the Textarea would not be wrapped after submitting the form.
  • Hard: It specifies that the Text in a Textarea is wraps when submitting the form.

Example: To show the working of wrap Attribute. 


<!DOCTYPE html>
        HTML wrap attribute
<body style="text-align:center">
    <h1 style="color: green;">
      HTML wrap attribute
    <!-- Assigning id to textarea. -->
    <textarea id="GFG_ID"
        This text is wrapped in
      the text area field.
    <button onclick="myGeeks()">


Supported Browsers: 

  • Firefox
  • Chrome
  • Safari
  • Internet Explorer
  • Opera


Last Updated : 15 Dec, 2021
Like Article
Save Article
Similar Reads
Related Tutorials