HTML <input> list attribute
Definition and Usage
list
attribute reference The <datalist> elementwhich includes predefined options for the <input> element.
Example
The following <input> element references a <datalist> element containing predefined values:
<input list="browsers"> <datalist id="browsers"> <option value="Internet Explorer"> <option value="Firefox"> <option value="Google Chrome"> <option value="Opera"> <option value="Safari"> </datalist>
Syntax
<input list="datalist_id">
Attribute Value
Value | Description |
---|---|
datalist_id | Specifies the id of the <datalist> element, which binds to the <input> element. |
Browser Support
The numbers in the table indicate the first browser version that fully supports this attribute.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
20.0 | 10.0 | 4.0 | Not supported | 9.6 |
list
The attribute is a new attribute of the <input> tag in HTML5.