HTML Forms

Textarea

Jen Kramer

AnnieCannons
HTML Forms

Check out a free preview of the full HTML Forms course

The "Textarea" Lesson is part of the full, HTML Forms course featured in this preview video. Here's what you'd learn in this lesson:

Jen inserts a textarea tag into the form so the user can record multiple lines of text.

Preview
Close

Transcript from the "Textarea" Lesson

[00:00:00]
>> Jen Kramer: So let's keep on going with our form.
>> Jen Kramer: Okay, so we have some special requests. Okay, so what do you think would go here normally, for a form like this, where they're asking for special requests?
>> Speaker 2: Input text.
>> Jen Kramer: An input text, so just a little box like this, that's all the requests we get?

[00:00:18]
>> Speaker 2: X box.
>> Jen Kramer: How about a big box, right, we wanna type in a big old box? All right, and so the way that we do that is with the text area. So we're going to go ahead and add that.
>> Jen Kramer: And guess how we add a text area?

[00:00:37]
How about textarea? Okay, that's textarea and textarea gets an id. And you could call this requests or often it's called the comments, right? This is also where your name is gonna go of comments.
>> Jen Kramer: /textarea, what is our value for textarea?
>> Speaker 3: The input that they-
>> Jen Kramer: Whatever they type in the box, whatever they type in the box is going to be the value.

[00:01:18]
>> Speaker 2: Which is why we don't need to say value in there.
>> Jen Kramer: Which is why we don't need to say value, because we have no idea what they're going to type.
>> Jen Kramer: Okay, all right, so we've got our text area set up here. Clearly we need a label, right?

[00:01:33]
So this is going to be label for what?
>> Speaker 2: Comments.
>> Jen Kramer: Comments to match our ID.
>> Jen Kramer: Okay, cool, if we go ahead and save that, though we can go ahead and refresh our webpage. And hopefully, we have a nice little box. Typing stuff in the box. It works, right?

[00:02:02]
It's also got this cool little corner, so we can pull and make it bigger.
>> Jen Kramer: It's kinda awesome, woo-hoo, we can break our web page, good fun, okay?
>> Speaker 2: So it does that change the browser, too?
>> Jen Kramer: Yeah, there could be some formatting that's associated with the browser.

[00:02:19]
When we clean it up and make it pretty, we'll make it look a little different.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now