list attribute

<input list ='value'>


List Attribute is used to provide pre defined options, when user tries to enter values in a input field. The <datalist> displays the options for the <input>.

Example Code:

Result :
Enter your favorite game:
  • The values in the <datalist> are listed in the <input>.
  • A variety of options can be placed inside the <datalist>.
  • It functions with the input types like "search, text, telephone, url, date pickers, email, range, number, and color".


It will function only in Firefox and Opera browsers.

Ask Questions

Ask Question