Set the text wrap in a form in HTML


Use the wrap attribute to set the text wrap in HTML. You can try to run the following code to implement wrap attribute −

Example

<!DOCTYPE html>
<html>
   <body>
      <form action = "">

         <textarea rows = "2" cols = "12" name = "details" wrap = "hard">
         This is demo text This is demo text This is demo text This is demo text</textarea><br>

         <input type = "submit">
      </form>
   </body>
</html>

Updated on: 03-Mar-2020

623 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements