Tutorials References Exercises Videos Menu
Create Website Get Certified Upgrade

HTML list Attribute


Definition and Usage

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


Applies to

The list attribute can be used on the following element:

Element Attribute
<input> list

Example

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 »

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 Not supported 9.6