Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY CYBERSECURITY DATA SCIENCE
     ❯   

HTML <input> list Attribute

❮ HTML <input> tag

Example

An <input> element with pre-defined values in a <datalist>:

<input list="browsers">

<datalist id="browsers">
  <option value="Internet Explorer">
  <option value="Firefox">
  <option value="Google Chrome">
  <option value="Opera">
  <option value="Safari">
</datalist>
Try it Yourself »

Definition and Usage

The list attribute refers to a <datalist> element that contains pre-defined options for an <input> element.


Browser Support

The numbers in the table specify the first browser version that fully supports the attribute.

Attribute
list 20.0 10.0 4.0 12.1 9.6

Syntax

<input list="datalist_id">

Attribute Values

Value Description
datalist_id Specifies the id of the datalist to bind the <input> element to

❮ HTML <input> tag