Warning:
This wiki has been archived and is now read-only.
Elements/datalist
From HTML Wiki
< Elements
<datalist>
The <datalist> element represents the list that represent predefined options for other controls.
Point
- The value of a option element in a datalist elment represent a suggestion.
- The datalist element is hooked up to an input element using the list attribute on the input element. [Example A]
HTML Attributes
See global attributes.
Examples
Example A
[try it]:
<input type="text" name="city" list="cityname"> <datalist id="cityname"> <option value="Boston"> <option value="Cambridge"> </datalist>
HTML Reference
The HTML5 specification defines the <datalist> element in 4.10.10 The datalist element.