Create a Select Dropdown for Choosing a Fruit
📖 Scenario: You are building a simple web form where users can pick their favorite fruit from a list.
🎯 Goal: Create a select dropdown menu with fruit options so users can choose one fruit.
📋 What You'll Learn
Use a
<select> element with the id fruit-select.Add exactly three
<option> elements inside the select.The options must be
Apple, Banana, and Cherry with values apple, banana, and cherry respectively.Include a label for the select with the text
Choose a fruit: and link it properly using the for attribute.Ensure the dropdown is accessible and uses semantic HTML.
💡 Why This Matters
🌍 Real World
Select dropdowns are common in web forms for choosing options like countries, fruits, or preferences.
💼 Career
Understanding how to build accessible and semantic form controls is essential for front-end web development jobs.
Progress0 / 4 steps