HTML <datalist> Tag

❮ Previous Reference Next ❯


<label for="browser">Select the browser:</label>
<input list="browsers" name="browser" id="browser">
<datalist id="browsers">
  <option value="Edge">
  <option value="Firefox">
  <option value="Chrome">
  <option value="Opera">
  <option value="Safari">
  <option value="Samsung">


The <datalist> element contains pre defined options for an <input> element.

These listed items would be considered the quick choices for the field, not a limitation of what can be entered.

Version: HTML5

Standard Syntax

<input list="identifier">
<datalist id="identifier">
	<option value="text">

Browser Support

The dropdown menu containing available options does not appear in Opera for Android.



Attribute Value Description
id identifier Unique in the whole document.(connect with input element)

Global Attributes

The <datalist> element also supports the Global Attributes in HTML.

Event Attributes

The <datalist> element also supports the Event Attributes in HTML.

By Default CSS Value(s)

Most of the browsers will display the <> element with the following by default value(s)

datalist {
	display: none;
❮ Previous Reference Next ❯