This page is In Progress

Notice: The WebPlatform project has been discontinued when the Stewards partnership agreement ended in September 2015. This site has been frozen, and the assets we have created will remain.

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