Add a select with two options.
Acceptance criteria
- 1.Add a select with two options.
HTML Tutorial · HTML Tags
These 10 tasks go with the HTML <select> Tag chapter. 5 of them ask you to build something small from scratch; 5 give you code that is already broken and ask you to work out why. Set aside about 90 minutes for the whole set, though you can do them in any order.
Nothing here is marked by a person. When you press Submit, the editor checks your code against the points listed under each task and tells you straight away what passed and what didn't (you need a free account to submit). If you get stuck, there are hints, and a worked solution once you've had a go. The first 2 tasks are free; the rest are part of the practice plan.
If it's been a while since you read the chapter, here is how it starts: “The tag is used to create a drop-down list in a form. It allows users to choose one or multiple options from a predefined list. Each option is defined using the tag, and options can be grouped with .” .
1.Add a dropdownexercise · easy · 10 min
Add a select with two options.
Passes when: Add a select with two options.
2.Name the dropdownexercise · easy · 10 min · practice plan
Give the select a name so its value is submitted.
Passes when: Give the select a name so its value is submitted.
3.Preselect an optionexercise · easy · 10 min · practice plan
Make the second option selected by default.
Passes when: Make the second option selected by default.
4.Allow several choicesexercise · easy · 10 min · practice plan
Let the user pick more than one option.
Passes when: Let the user pick more than one option.
5.A grouped dropdownexercise · medium · 10 min · practice plan
Group two options under a label.
Passes when: Group two options under a label.
6.Fix the divs used as optionsbug fix · easy · 8 min
A dropdown holds option elements.
Passes when: A dropdown holds option elements.
7.Fix the dropdown with no namebug fix · easy · 8 min · practice plan
Without a name the choice is never submitted.
Passes when: Without a name the choice is never submitted.
8.Fix the default set on the wrong elementbug fix · easy · 8 min · practice plan
The default choice is marked on the option.
Passes when: The default choice is marked on the option.
9.Fix the missing multiple attributebug fix · easy · 8 min · practice plan
Picking several needs the multiple attribute.
Passes when: Picking several needs the multiple attribute.
10.Fix the group with no labelbug fix · easy · 8 min · practice plan
An option group needs a label to be useful.
Passes when: An option group needs a label to be useful.
Between them these tasks cover Dropdowns, options and multiple.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.