From the course: HTML & CSS: Creating Forms

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Date and time input types

Date and time input types - HTML Tutorial

From the course: HTML & CSS: Creating Forms

Start my 1-month free trial

Date and time input types

- [Instructor] There are other input types that can be used to collect numeric data. In this video we'll look at the date, time, and telephone input types, and again, look at attributes you can use to require users to enter data in a certain format. We'll continue with the same exercise file from the previous video. The next input type is date, which is used to accept dates. So back in the code I'm going to enter input type = date, name, let's call this birthday, we can ask the user their birthday, id = birthday. And then label for = birthday, and close the label. So now I have Birthday in here. So you'll see that there's placeholders for month, day, and year. And you can type directly in each of these. So, for example, I can enter 12 for month, 01 for day, whatever I want for the year, so it's a little bit different than a text field in that way. When you're in any of these three parts of the number field you can use a stepper to go up and down. It starts with today under the year…

Contents