You are here : htmlHTML 5datalist

<datalist> - HTML 5

The <datalist> tag specifies a list of pre-defined options for an <input> element.

The <datalist> tag is used to provide an "autocomplete" feature on <input> elements. Users will see a drop-down list of pre-defined options as they input data.

Use the <input> element's list attribute to bind it together with a <datalist> element.


Syntax

    <input list="browsers">	<datalist id="browsers">	  <option value="Internet Explorer">  <option value="Firefox">  <option value="Chrome">  <option value="Opera">  <option value="Safari">	</datalist>


Example

    <input list="browsers">	<datalist id="browsers">	  <option value="Internet Explorer">  <option value="Firefox">  <option value="Chrome">  <option value="Opera">  <option value="Safari">	</datalist>


Output / Return Value


Limitations


Alternatives / See Also


Reference