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

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…

Contents