Set 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: 2020-03-03T12:27:38+05:30

762 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements