LOGBOOK

HELP

Quiz Entry - updated: 2026.07.05

How do you create dropdown menus in HTML?

A dropdown is a <select> element containing one <option> per choice — a compact way to offer many options without a long list of radio buttons.

When a group has several possible values, a dropdown saves space by hiding the choices until clicked:

<label for="cars">Choose a car:</label>
<select id="cars">
    <option value="volvo">Volvo</option>
    <option value="saab">Saab</option>
    <option value="opel">Opel</option>
    <option value="audi">Audi</option>
</select>

The pieces:

  • <select> — the dropdown container; it behaves like other form inputs and takes a name attribute that identifies the field on submission.
  • <option> — one selectable item; the text between the tags is what the user sees.
  • value — the data actually sent when the form is submitted, which can differ from the visible label.

A related convenience for text inputs is the placeholder attribute, which shows greyed-out hint text that vanishes as soon as the user types:

<input type="text" id="name" placeholder="Enter your name">

Important: a placeholder is not a substitute for a <label>. It disappears on typing and isn't reliably read by screen readers, so always keep a real label for accessibility.

Go deeper:

From Quiz: WEBT / HTML Documents | Updated: Jul 05, 2026