LESSON 69 OF 120

Build: a select menu

Offer an initial prompt and at least three real options in a labelled select.

Official sourceWHATWG HTML — selectReviewed: 2026-08-26
STEP 1 · LEARN

How it works

Offer an initial prompt and at least three real options in a labelled select. Semantic structure should describe meaning, not visual appearance.

Correct example
<form><label for="service">Service</label><select id="service" name="service" required><option value="">Choose a service</option><option value="audit">Audit</option><option value="site">Website</option><option value="system">Web system</option></select></form>

select offers a choice among options. For a required single-choice select, the first option with an empty value acts as the initial prompt; real options have non-empty submitted values.

Common mistake
<form><select><option>Website</option></select></form>

The control has no label, id, name or required state. Its only option declares no value and there is no separate initial prompt.

STEP 2 · APPLY

Your exercise

Complete the example. Offer an initial prompt and at least three real options in a labelled select.

STEP 3 · BUILD

Write and see the result

index.htmlHTML
Safe resultisolated
The draft stays only in this browser.HTML and CSS allowed · scripts and network blocked
STEP 4 · CHECK

What needs to pass

0%not checked
  • The select has id, name and required.
  • The first option is the initial prompt with an empty value.
  • The select contains three real options with values.
  • The select has a connected label.
Explain the solution logic

Connect the label through for and id, add name and required, then create the first option with an empty value and three more options with distinct values.