HTML <data> Tag


The <datalist> tag specifies a list of predefined input element choices. These proposed values will display as a dropdown list in the input control, and the available possibilities will be filtered as the user adds data into the input control. This tag is sometimes referred to as the <datalist> element.

The <datalist> tag is used to offer "autocomplete" functionality to input components. As they enter data, users will see a drop-down list of pre-defined alternatives.

The id attribute of the <datalist> element must be the same as the list attribute of the <input> element (this binds them together).

Syntax

Example

Preview

Attributes

Attribute Value Description
value machine readable format Specifies the machine-readable translation of the element's content.

Supported Browsers

Element Chrome Firefox Safari Edge / IE Opera
<data> 62.0 22.0 No 13.0 49.0