Recall & Review
beginner
What is the purpose of the <textarea> element in HTML?
The <textarea> element creates a multi-line text input area where users can enter longer text, like comments or messages.
Click to reveal answer
beginner
How do you set the visible size of a <textarea>?
Use the
rows attribute to set the number of visible text lines and the cols attribute to set the visible width in characters.Click to reveal answer
intermediate
How can you make a <textarea> accessible for screen readers?
Use a <label> element linked with the
for attribute matching the <textarea>'s id. This helps screen readers announce the purpose of the textarea.Click to reveal answer
beginner
What attribute disables user input in a <textarea>?
The
disabled attribute makes the textarea uneditable and prevents users from typing or changing its content.Click to reveal answer
beginner
How do you add placeholder text inside a <textarea>?
Use the
placeholder attribute to show a short hint or example text inside the textarea before the user types anything.Click to reveal answer
Which attribute controls the number of visible lines in a <textarea>?
✗ Incorrect
The
rows attribute sets how many lines tall the textarea appears.How do you link a <label> to a <textarea> for accessibility?
✗ Incorrect
Linking with
for and id helps screen readers identify the textarea's purpose.What happens if you add the
disabled attribute to a <textarea>?✗ Incorrect
The
disabled attribute prevents user input and grays out the textarea.Which attribute shows a hint inside a <textarea> before typing?
✗ Incorrect
The
placeholder attribute displays example text inside the textarea.What is the default behavior of a <textarea> element?
✗ Incorrect
The textarea is designed for multi-line text input by default.
Explain how to create an accessible multi-line text input using the <textarea> element.
Think about size, labeling, and user guidance.
You got /4 concepts.
Describe the difference between the
rows and cols attributes in a <textarea>.One controls height, the other width.
You got /2 concepts.