datalist

FilterElements

<datalist> ... </datalist>

HTML5 only. Used with an input control set to the new list type, the datalist element creates a drop-down menu of suggestions (via the option element), providing an “auto-complete” function as the user types in the field (also called a combobox). The difference between datalist and select is that the user does not need to select one of the suggestions and can write anything in the field.

Start/End Tags

Required/Required

Specifications

  • HTML5
<input name="icecream" type="text" list="flavors">
<datalist id="flavors">
  <option value="Vanilla">
  <option value="Chocolate">
  <option value="Mango">
</datalist>

Rendered Example

  

The datalist element provides data for the input, but does not render.