HTML <datalist>Tag
Example
Below is an <input> element, with its possible values described in <datalist>:
<input list="browsers">
<datalist id="browsers">
<option value="Internet Explorer">
<option value="Firefox">
<option value="Chrome">
<option value="Opera">
<option value="Safari">
</datalist>
Try it Yourself »
Browser Support
The numbers in the table specify the first browser version that fully supports the element.
| Element | |||||
|---|---|---|---|---|---|
| <datalist> | 20.0 | 10.0 | 4.0 | 12.1 | 9.0 |
Tag definition and usage instructions
The <datalist> tag specifies a list of possible options for an <input> element.
The <datalist> tag is used to provide an "autocomplete" feature for <input> elements. Users see a dropdown list with pre-defined options that will be used as user input data.
Use the list attribute of the <input> element to bind the <datalist> element.
Differences between HTML 4.01 and HTML5
The <datalist> tag is new in HTML5.
Global Attributes
The <datalist> tag supports theglobal attributes in HTML.。
Event Attributes
The <datalist> tag supports theevent attributes in HTML.。
Other Extensions