Description:

The HTML <datalist> tag is used for providing an "autocomplete" feature on form elements. It enables you to provide a list of predefined options to the user as they input data.

The <datalist> tag is used to provide an "autocomplete" feature on <input> elements. Users will see a drop-down list of pre-defined options as they input data.

Example Code:
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">
</datalist>
Result:
Enter an Australian State:
Attributes:

None

Global Attributes:

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

Event Attributes:

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



Last updated on 2 August 2018 By Rene Spronk

View All HTML Tags

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.