HTML | <textarea> tag

In the <textarea> tag defines a multi-line text input control. A text space will hold an infinite range of characters, and therefore the text renders in a set-width font (usually Courier).
The size of a text area is often such by the cols and rows attributes, or perhaps better; through CSS’ height and dimension properties.




  • autofocus: It specifies when the page is loaded text area will automatically focus
  • cols: It specifies width of text area are visible
  • dirname: It specifies text area are disable
  • form: It specifies one or more forms the text area belongs to
  • maxlength: It specifies how many character are allowed in text area
  • name: It specifics name of an element
  • placeholder: The placeholder attribute specifies a short hint that describes the expected value of an input field/text area
  • readonly: it shows the text should be read-only
  • rows: It shows the visible number of line in a text area
  • wrap: It will Specifies how the text in a text area are wrapped at a given width when submitted in a form






<!DOCTYPE html> 
    <title>textarea tag</title
        h2 { 
            color: green; 
            font-style: italic; 
        body { 
            text-align: center; 
    <h2>HTML Textarea tag </h2
    <form action="#"
        <textarea rows="7"
        <input type="submit"



Supported Browsers: The browsers supported by HTML <textarea> tag are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Apple Safari
  • Opera


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :
Practice Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.