HTML <datalist> tag


The following is an input element, datalist describes the possible values:

<input id="myCar" list="cars" />
<datalist id="cars">
  <option value="BMW">
  <option value="Ford">
  <option value="Volvo">

Try it yourself

Definition and Usage

<Datalist> tag to define a list of options. Please input element with the use of the element to define the possible input values.

datalist and its options will not be displayed, it is just a list of legitimate input values.

Use the input list attributes of the element to bind datalist.

Browser Support

All major browsers support <datalist> tag, in addition to Internet Explorer and Safari.

HTML 4.01 and HTML 5 differences between

<Datalist> tag is new in HTML 5 tag.

Global Properties

<datalist> tag supports HTML in the global properties .

Event Properties

<datalist> tag supports HTML in the event properties .

Related Pages

HTML DOM Reference: Datalist objects