The Textarea in HTML Input Form
Here we will show you how to retrieve larger and multple lined text strings from your web page visitors with the HTML textarea form.
The textarea form element is a multi lined box which is used for collecting strings of text from your web page visitors. By insering this form on your website it enables your visitors to input larger text strings than the normal text form. Its also used together with other form types as a message box for example.
Note that the textarea in HTML is using an opening and closing tag.
Using Attributes in the table below you can format the size and look of the textarea input
| Attribute | Description |
|---|---|
| cols | Amount of columns within the with form |
| rows | Amount of rows within the with form |
| name | Name of variable submitted with form |
HTML textarea Example with Submit button
|
<form action="formOutput.php" method="post"> <textarea name="exampleform" rows="5" cols="50" ></textarea> <input type="submit" value="Submit" /> </form> |
Example with submit and reset button
|
<form action="formOutput.php" method="post"> <textarea name="exampleform" rows="5" cols="50" ></textarea> <input type="submit" value="Submit" /> <input type="reset" /> </form> |