Add a named select with two options.
Acceptance criteria
- 1.Add a named select with two options.
HTML Tutorial · HTML Tags
These 10 tasks go with the HTML <selectedcontent> 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: “Learn how the experimental HTML <selectedcontent> tag displays the selected option inside a customizable select button.” .
1.A dropdown with optionsexercise · easy · 10 min
Add a named select with two options.
Passes when: Add a named select with two options.
2.A button inside the selectexercise · easy · 10 min · practice plan
Add the button that shows the current choice.
Passes when: Add the button that shows the current choice.
3.Richer option contentexercise · easy · 10 min · practice plan
Put a span inside an option.
Passes when: Put a span inside an option.
4.Preselect a valueexercise · easy · 10 min · practice plan
Mark the second option as selected.
Passes when: Mark the second option as selected.
5.A labelled custom pickerexercise · medium · 10 min · practice plan
Build a labelled select with a button and two options.
Passes when: Build a labelled select with a button and two options.
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 button placed outsidebug fix · easy · 8 min · practice plan
The trigger belongs inside the select.
Passes when: The trigger belongs inside the select.
8.Fix the swatch outside the optionbug fix · easy · 8 min · practice plan
The rich content belongs inside the option.
Passes when: The rich content belongs inside the option.
9.Fix the default marked with checkedbug fix · easy · 8 min · practice plan
Options use selected, not checked.
Passes when: Options use selected, not checked.
10.Fix the picker with no labelbug fix · easy · 8 min · practice plan
The control does not say what it chooses.
Passes when: The control does not say what it chooses.
Between them these tasks cover Customisable select, Rendering the chosen option and Fallbacks.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.