HTML5 Datalist

By | July 25, 2014

Datalist Tag is an input element, which is used as both dropdown and textbox element. The main advantage of datalist is autocomplete option.

Syntax for datalist will looks like the combination of input element textbox and dropdown.

All options have to be inside the datalist and datalist’s ID should be declared as input element list parameter.

 

Datalist HTML Coding

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<input list="browsers">
<datalist id="browsers">
<option value="Alpha">
<option value="Beta">
<option value="Gamma">
<option value="Tera">
<option value="Hexa">
</datalist>

 

Example for Datalist


2 thoughts on “HTML5 Datalist

  1. Shahbaz Ahmed Bhatti

    Dear Freez Coder Team, What is Purpose of this field??? i dont getting understand purpose of use datafield?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

reductive-bangalay