Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML input list attribute

HTML The list attribute

HTML input Tag Reference HTML tag

Example

With predefined values in the element:

 

 

 

 

 

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Internet Explorer 10, Firefox, Opera, and Chrome support the list attribute.

**Note:** Safari or Internet Explorer 9 and earlier versions do not support the the list attribute of the tag.


Definition and Usage

The list attribute refers to the element, which contains the predefined options for the element.


Differences between HTML 4.01 and HTML5

The list attribute is new in HTML5.


Syntax

Attribute values

Value Description
datalist_id Specifies the id of the datalist bound to the element.

HTML input Tag Reference HTML tag