0
0
HTMLmarkup~5 mins

Textarea in HTML - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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>?
Acols
Bsize
Clength
Drows
How do you link a <label> to a <textarea> for accessibility?
ANo linking is needed
BUse the <code>for</code> attribute on the label matching the textarea's <code>id</code>
CUse the <code>name</code> attribute on the label
DPlace the label inside the textarea
What happens if you add the disabled attribute to a <textarea>?
AThe textarea becomes read-only and uneditable
BThe textarea disappears
CThe textarea allows unlimited input
DThe textarea resets its content
Which attribute shows a hint inside a <textarea> before typing?
Ahint
Btitle
Cplaceholder
Dlabel
What is the default behavior of a <textarea> element?
AAllows multi-line text input
BAllows only single-line input
CIs read-only by default
DIs hidden 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.