<textarea>

Description

This element creates a multiline text entry control. This element is usually used in conjunction with the <form> element.

Example


<html>
<body>
     <form>
          <fieldset align="center">
               <textarea name="textfield1" 
                         cols="40" wrap="hard">
                         your name and surname
               </textarea>
          </fieldset>
     </form>
</body><!--  ww w. ja v a  2s.  c  o m-->
</html>

Click to view the demo

The code above generates the following result.

textarea

rows attribute

This attribute establishes the height of the element in terms of rows. The value is indicated by an integer.


<html>
<body>
     <form name="form1" method="post" action="">
     <!-- w  ww. j av a2 s. co  m-->
          <fieldset align="center">
               <textarea name="textfield1" 
                         cols="40" 
                         rows="2" 
                         wrap="hard">your name and surname</textarea>
               <br>
          </fieldset>
    
     </form>
</body>
</html>

Click to view the demo

The code above generates the following result.

textarea




















Home »
  HTML CSS »
    HTML CSS Reference »




HTML Tag Reference
CSS Reference
CSS Selector Reference
Encoding Reference