This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

datalist

Summary

The datalist element (<datalist>) represents a set of <option> elements that represent predefined options for other controls. It may be associated with an <input> element by adding a list attribute to the input element.

Overview Table

DOM Interface
HTMLDataListElement

Examples

<input type="text" name="locations" list="places">
<datalist id="places">
     <option>Amman, Jordan</option>
     <option>New York, NY, USA</option>
     <option>Paris, France</option>
     <option>Vienna, Austria</option>
</datalist>

Related specifications

HTML 5.1
W3C Working Draft
HTML 5
W3C Recommendation

See also

Related articles

HTML

Attributions