HTML Form: Multiline textbox using textarea

This entry is part 4 of 10 in the series HTML Form

To create a multiline textbox or textarea, we use <textarea> tag.

The <textarea> tag contains a rows attribute that specifies the number of lines of text in the box.

<textarea name='comment' rows='3'></textarea>
Text Area
<!DOCTYPE html>
<html>
<head lang='en'>     
 <meta charset='UTF-8'>
 <title>Codecrawl.com-Form</title>

</head>
<body>
<br>
Name: <input type='text' name='name'>
<br>
Phone: <input type='text' name='phone'>
<br>

Comments:
<br>
<textarea name='comment' rows='3'></textarea>

</body>
</html>

The column attribute that specifies how many characters wide the text area will be can also be added.

<textarea name='comment' rows='3' cols='50'></textarea>


Text Area Output

Series Navigation<< HTML Form: Width of the text box
HTML Form: Creating a Submit or Reset button >>