From the course: HTML and CSS: Creating Forms
Unlock this course with a free trial
Join today to access over 25,600 courses taught by industry experts.
Radio buttons and checkboxes
From the course: HTML and CSS: Creating Forms
Radio buttons and checkboxes
- [Instructor] Besides typing in data, there are times when you want to have the user select between multiple options. The most common ways to do this are using radio buttons, check boxes or select menu, which is often referred to as a dropdown menu. In this video, we'll look at radio buttons and check boxes. On the screen, you see at the top, radio buttons and check boxes below it. They look very similar with the only difference being whether you can choose multiple options, like on the check boxes, or just one option on the radio buttons. With radio buttons on a web form, if you select one of the options, it will unselect anything you had already selected. So you can't have more than one selection at once. So here in the code, we're going to ask the user to tell us their favorite color. This works a little differently than the other input types we looked at earlier. Instead of one input for the entire question, there will be a separate input and label for each selection the user can…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Basic form structure4m 11s
-
(Locked)
Name, id, and label5m 24s
-
(Locked)
Email and URL input types5m 1s
-
(Locked)
Number and tel input types6m 7s
-
(Locked)
Date and time input types4m 34s
-
(Locked)
Radio buttons and checkboxes5m 54s
-
(Locked)
Select element5m 47s
-
(Locked)
Textarea element2m 38s
-
(Locked)
Other input types4m 54s
-
(Locked)
Buttons3m 27s
-
(Locked)
Placeholder attribute2m 54s
-
(Locked)
Other form attributes3m 57s
-
(Locked)
-
-
-
-