X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML <input> list Attribute

HTML input Tag Reference 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 »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The list attribute is supported in Internet Explorer 10, Firefox, Opera, and Chrome.

Note: The list attribute of the <input> tag is not supported in Internet Explorer 9 and earlier versions, or in Safari.


Definition and Usage

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


Differences Between HTML 4.01 and HTML5

The list attribute is new in HTML5.


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 Reference HTML <input> tag

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook