Text Area

The other item that makes our form-building life easier is the <textarea> form element. Text areas let users enter more than one line of text at a time:

<form action="showInfo.cgi" method="post">
  Your comments are eagerly awaited: <br />
<textarea name="comments"
    rows="5" cols="45">
</textarea>
  <br />
  <input type="submit" value="Send Data" />
</form>
Your comments are eagerly awaited:

As with all other form elements, <textarea> needs a name= attribute. The new attributes for this element are:

Any text that you put between the opening <textarea> and closing </textarea> tags will be the initial value of your text area. It will be interpreted as pure text, so you shouldn't put any HTML commands in it.

<form action="showInfo.cgi" method="post">
  Your comments are eagerly awaited: <br />
<textarea name="comments"
    rows="5" cols="45">
I love your product because
</textarea>
  <br />
  <input type="submit" value="Send Data" />
</form>
Your comments are eagerly awaited:

  Try <select>  Index Resetting a Form