HTML: datalist

The <datalist> element provides suggestions for an input without restricting the user to those suggestions.

What you will learn

Minimal example

<label for="browser">Browser</label>
<input id="browser" name="browser" list="browsers">
<datalist id="browsers">
  <option value="Chrome">
  <option value="Firefox">
</datalist>

Users may choose a suggestion or type a different value. Use select when the value must be one of a fixed set.

Common mistakes