Check out a free preview of the full HTML Forms course:
The "Input Q&A" Lesson is part of the full, HTML Forms course featured in this preview video. Here's what you'd learn in this lesson's course:

Jen answers questions about input types regarding the for attribute, placeholder text, and the phone number field.

Get Unlimited Access Now

Transcript from the "Input Q&A" Lesson

[00:00:00]
>> Student1: Is it bad to just put in for every time you use label?
>> Jen Kramer: No, you won't hurt anything. You can put in a four, four equals subscribe. And you could put in an ID of subscribe.
>> Jen Kramer: If you want to do that, that's not gonna hurt anything.

[00:00:17]
We haven't broken anything. But it's not required.
>> Jen Kramer: Make sense? Okay, so I'm just gonna take that out, so I don't confuse anybody further. Any other questions at the moment? Yes?
>> Student1: Okay, so for the phone number-
>> Jen Kramer: Yeah?
>> Student1: That box, and then the text area box.

[00:00:37]
Writing we have in there is different.
>> Jen Kramer: Yes.
>> Student1: Can we interchange that, can we do the placehold? Cuz I personally don't like having to erase text.
>> Jen Kramer: Okay.
>> Student1: But I like writing over it.
>> Jen Kramer: Okay.
>> Student1: I find that easier. So could you do placeholder there?

[00:00:51]
>> Jen Kramer: Sure, let's go ahead and try putting a placeholder in the text area. So in our text area, we'll put in placeholder equals quote tell me everything.
>> Jen Kramer: Okay, so let's try that.
>> Jen Kramer: That shows up in Firefox.
>> Jen Kramer: And that shows up, I think, here in Chrome.

[00:01:25]
>> Jen Kramer: Something's cached on my Chrome. But it looks like it might be working. But notice that it is a different font. This is Courier that's showing up here, that font. As opposed to up here, where it's Helvetica.
>> Jen Kramer: That's a weird browser thing.
>> Student1: Okay.
>> Jen Kramer: How might we fix that?

[00:01:45]
>> Class: CSS.
>> Jen Kramer: How about a little CSS? We owe a lot of work to do on this form of CSS. Okay, yes?
>> Student1: Okay, and then, when you have these forms and you can enter your phone number-
>> Jen Kramer: Yeah.
>> Student1: I like it when they have it set up for you so when you do the three numbers, they put the dash in for you.

[00:02:05]
>> Jen Kramer: Yeah, that's-
>> Student1: Is that HTML? Or not.
>> Jen Kramer: No, that's JavaScript.
>> Student1: Okay.
>> Jen Kramer: And it's totally cool when they do that, provided that you are collecting phone numbers from people in the United States and Canada. Then that works great. If you're from another country and your phone numbers that you're collecting or in a different format, it may not be necessarily so good.

[00:02:27]
But if you have a US based company and you're gonna collect US based phone numbers, phone numbers from Canada, then that's an awesome thing.
>> Jen Kramer: I know you got to think bigger. It's the Internet, you gotta think about the whole world. [LAUGH]