XML technologies / HTML & XHTML / Alphabetical list of HTML and XHTML elements / datalist
(Excerpt from "HTML & XHTML ─ kurz & gut" by Jennifer Niederst Robbins)
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
HTML 5 |
datalist
<datalist> ... </datalist>
Used when the control input has been assigned the new type list. In this case, the element datalist creates a dropdown menu, using the element option, containing a series of suggestions. This makes it possible to implement an autocomplete feature while the user types in the text field, also called a combo box. The difference between datalist and select is that the user is not required to select a suggestion and can enter any value in the field.
Notes
HTML 5 only.
Start/end tag
Required/required
Attributes
Example
<input type="text" list="Geschmack">
<datalist id="Geschmack">
<option value="Vanille">
<option value="Schokolade">
<option value="Mango">
</datalist>
|
Copyright © 2010 O’Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from "HTML & XHTML ─ kurz & gut" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de