Lesson 22: HTML Textarea & Select

Dropdowns and Multi-line Text Fields

The <textarea> tag creates a multi-line text field for longer messages, while <select> creates a dropdown list of options.

<textarea rows="4" cols="50">Enter long message here...</textarea>

Why&How to use:

Use <textarea> for comment sections or feedback forms, and <select> with <option> tags to let users choose from predefined choices.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Textarea and Select</title>
</head>
<body>
<h2>Feedback Form</h2>
<form>
<label for="country">Choose Country:</label>
<select id="country" name="country">
<option value="bd">Bangladesh</option>
<option value="us">United States</option>
</select>
<br><br>
<label for="feedback">Your Message:</label><br>
<textarea id="feedback" name="feedback" rows="4" cols="30"></textarea>
</form>
</body>
</html>