Question:

Which of the following element allows multi-line text input in HTML?

Show Hint

Use the textarea tag when you want users to enter paragraphs or long text in forms.
  • Textarea
  • Input
  • Select and Option
  • Form
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Step 1: Understand HTML input elements.

HTML provides different elements to collect user input in web forms. Each element serves a specific purpose depending on the type of input required.

Step 2: Explain the textarea element.

The <textarea> element is used when the user needs to enter multiple lines of text. It is commonly used for writing messages, comments, or descriptions.

Example:

<textarea rows="4" cols="50"></textarea>
This element creates a multi-line text input area on a web page.

Step 3: Analyze other options.

Input: The <input> element generally accepts single-line input.

Select and Option: These elements are used to create dropdown lists.

Form: The <form> element acts as a container for form elements but does not accept text input itself.

Step 4: Conclusion.

Therefore the HTML element that allows multi-line text input is the textarea element.
Was this answer helpful?
0
0