Form Stage 2: Input Types
Explore different HTML input types, checkboxes, radio buttons, and select dropdowns.
Loading...
Loading exercise code...
Exercise: Form Stage 2 - Input Types
Objectives
In this stage, you will:
- Learn about different input types beyond text
- Understand checkboxes and radio buttons
- Practice using select dropdowns
- Solve the next treasure hunt challenge
- Continue building form skills
Input Types You’ll Encounter
Multiple Choice Inputs:
type="radio"- Select ONE option (mutually exclusive)type="checkbox"- Select MULTIPLE options<select>- Dropdown list of options<textarea>- Multi-line text input
Other Useful Types:
type="number"- Numeric inputtype="date"- Date pickertype="email"- Email validationtype="password"- Masked text
Form Attributes Used
name- Groups radio buttons togethervalue- The data sent when selectedchecked- Pre-select an optionmultiple- Allow multiple selections in select
The Challenge Continues
Your treasure hunt continues! Complete the challenge in Stage 2 to unlock Stage 3.
Accessibility Tips
- Always label your inputs, even checkboxes and radio buttons
- Use
<fieldset>and<legend>to group related inputs - Radio buttons with the same
nameare automatically grouped - Users should be able to click on the label text to select
Next Steps
- Try selecting different input types
- Notice how radio buttons work together
- Explore the select dropdown options
- Answer the clue and move to Stage 3!