Textarea HTML Forms

Is current?: 
Yes

The text area template textarea.htm is a type of HTML form.  

Lines 25-29 display instructions. In this template, a question is followed by an open field known as a text area. Users type their responses in the text area and then click on the submit button. Text areas are used when information that spans several lines is needed (e.g., open-ended feedback). The text area is created using the textarea tag as shown below.

<table>

  <tr>

    <td>Please type 3-5 sentences about one of your favorite places to go in
         Charlottesville.<br/>     

       <p><textarea class="inputtext" name="taitem1" rows="5" cols="75"></textarea></p>

    </td>

  </tr>

</table> <br />

This table has one row with one data cell column. The question is followed by the <br/> tag, which creates a line break so that the text area appears on the next line. This textarea is specified as displaying 5 rows and 75 columns; note that the actual display depends on the browser.  The name of this textarea variable is  taitem1. The styling of the text typed in is controlled by inputtext, which is listed on line 9.  Unlike the textbox, the Enter key can be used when typing. Although no checks are made prior to be form submission, note that the database cannot store more than 2000 characters per textarea variable.

Files: