HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
A datalist with pre-defined options (connected to an <input> element)
The <datalist>
tag specifies a list of pre-defined options for an <input> element.
The <datalist>
tag is used to provide an "autocomplete" feature
for <input>
elements. Users will see a drop-down list of pre-defined options as they input data.
The <datalist>
element's id attribute
must be equal to the <input> element's list attribute (this binds them
together).
The numbers in the table specify the first browser version that fully supports the element.
Element | |||||
---|---|---|---|---|---|
<datalist> | 20.0 | 10.0 | 4.0 | 12.1 | 9.5 |
The <datalist>
tag also supports the Global Attributes in HTML.
The <datalist>
tag also supports the Event Attributes in HTML.
HTML DOM reference: Datalist Object
Most browsers will display the <datalist>
element with the following default values:
datalist {
display: none;
}