Articles → HTML → Textarea In HTML

Textarea In HTML






Purpose





Syntax


<textarea></textarea>



Example


<html>
   <head>
      <title>textarea Demo</title>
   </head>
   <body>
      <form>
         <textarea></textarea>
      </form>
   </body>
</html>

Try It


Output


Picture showing the output of textarea in html
Click to Enlarge


Cols And Rows Attribute In Textarea




  1. Cols → cols attribute is used to configure the width of the textarea
  2. Rows → rows attribute is used to configure the length of the textarea

Syntax


<textarea cols="" rows=""></textarea>



Example


<html>
   <head>
      <title>textarea Demo</title>
   </head>
   <body>
      <form>
         <textarea cols="20" rows="20"></textarea>
      </form>
   </body>
</html>

Try It


Output


Picture showing the output of textarea in html with rows and cols attribute
Click to Enlarge


Browser Support


Internet ExplorerFirefoxChromeSafariOperaEdge
YesYesYesYesYesYes



Posted By  -  Karan Gupta
 
Posted On  -  Sunday, November 6, 2016
 
Updated On  -  Sunday, December 3, 2017

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250