HTML <datalist> Tag


The <datalist> HTML tag is used in conjunction with the <input> element to create a predefined list of options for user input. It provides a convenient way to offer suggestions or autocomplete options to users as they type into an input field. The <datalist> element contains a series of <option> elements, each representing a possible value or suggestion for the input field. When a user interacts with the associated <input> element, a dropdown list of options from the <datalist> is displayed, allowing the user to select one of the predefined values or continue typing. This tag is particularly useful for enhancing the usability and user experience of web forms.


Permitted Parents
Any element that accepts phrasing content
<option> elements
Start/End Tags
Start tag: required, End tag: required


Enter an Australian State:<br>
<input list="browsers">
<datalist id="browsers">
<option value="South Australia">
<option value="Western Australia">
<option value="Victoria">
<option value="New South Wales">
<option value="Queensland">
<option value="Tasmania">



Global Attributes

The <datalist> tag also supports the Global Attributes in HTML5

Event Attributes

The <datalist> tag also supports the Event Attributes in HTML5

Browser Support

The following table will show you the current browser support for the HTML <datalist> tag.

Edge Chrome Firefox Opera Safari
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview

Last updated by CSSPortal on: 30th September 2023