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>
<head lang='en'>     
 <meta charset='UTF-8'>

Name: <input type='text' name='name'>
Phone: <input type='text' name='phone'>

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


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 >>

Leave a comment

Leave a Reply