diffsnack
HTML Guess the result Level 1

HTML exercise: textarea and datalist — What kind of form field does <textarea> create?

The exercise

What kind of form field does <textarea> create?

1<form action="/contact" method="post">
2 <label for="msg">Message</label>
3 <textarea id="msg" name="msg"
4 rows="4"></textarea>
5</form>
  1. A one-line password field
  2. A multi-line text box
  3. A drop-down menu
  4. A tick box

Solution

Answer: A multi-line text box

The <textarea> element creates a multi-line text box where visitors can type longer messages. Here rows="4" sets its visible height to about four lines of text.

Play this exercise Learn the concept: textarea and datalist