Longer Text
A text input has only one line, which is too little for a longer message. For text that can have several lines, we use the textarea element (a text area).
Unlike input, textarea has a closing tag. Whatever we write between the tags appears in the box as pre-filled text, so for an empty box, we write the closing tag right after the opening one. The rows attribute sets how many lines of text the box shows; the user can still write more.
<label for="input-message">Message</label>
<textarea name="message" id="input-message" rows="3"></textarea>This code is displayed like this:
Instructions
- 1
In the empty
div, create atextareaelement with the attributenamewith the valueaboutand the attributeidwith the valueinput-about. - 2
Add the attribute
rowswith the value4to thetextarea, so that the box shows four lines. - 3
Before the
textarea, create alabelwith the contentAbout meand the attributeforwith the valueinput-about.