HTML - datalist

1 - About

datalist is a html element that creates a set of value permitted (a domain) that may be used in a input element by grouping options.

3 - Example

3.1 - Text

with a input text element

<datalist id="theme-values">
    <option value="Orange">
    <option value="Red">
    <option value="Green">
    <option value="Yellow">

<label for="themes">Choose a theme:</label>
<input type="text" list="theme-values" id="themes" size=20 />

3.2 - Number

with a input number element

<datalist id="even-values">
    <option value="2">
    <option value="4">
    <option value="6">
    <option value="8">

<label for="numbers">Choose a value:</label>
<input type="number" list="even-values" id="numbers"  />

4 - Documentation / Reference

Data Science
Data Analysis
Data Science
Linear Algebra Mathematics

Powered by ComboStrap