Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed HTML Forms!
You have completed HTML Forms!
Preview
Sometimes a single line of text isn’t enough and a simple input element won’t work. For example, maybe you have a contact form and you need a place for people to type a message. In those cases, it’s best to use a textarea.
The <textarea> element
- The
textarea-element accepts multiple lines of text from the user. Most browsers will render the textarea element with a widget to allow for resizing the editing area.
Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
For example, maybe you have a contact form
and
0:00
you need a place for people to type a
message.
0:00
In those cases, it's best to use the
textarea element.
0:03
In our sign-up form, we want to add a text
area
0:07
so that users can type in a short bio
about themselves.
0:11
I'm going to type in a textarea and then
explain it.
0:15
Just below our input elements, I'll type
in textarea,
0:18
and close it, and then I'll give it some
attributes.
0:24
I'll say id equals bio, and name
0:29
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up