HTML · Forms and controls

datalist

Provides suggested values for an input while still allowing free text.

Syntax
<datalist id="…">…</datalist>

Example

Try it

More in this group

button fieldset form input input types label legend meter

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course