<input type=text list=planetdata>
<option value="Fomalhaut b">
<option value="HR 8799">
Supported Browser Screenshots
The Low Down
When an an
input with a
list attribute that matches a corresponding
comes into focus, a dropdown menu appears populated by the
option elements present in the
- You might think of a datalist input like you would a group of radio buttons with an "Other: _________" choice.
- Firefox 4b12 doesn't show list on focus, only suggests after typing.
- Fallback is just a regular text input.
- Safari 5 accepts the attribute, but doesn't do anything with it.
- Behaves a bit like autocomplete or "suggested" items might. If you type "V" the list will show only items that start with "V".
- Progressive usage by Jeremy Keith
Important: you need to set this for WebKit:
<label for="source">How did you hear about us?</label>
If other, please specify:
<input id="source" name="source" list="sources">