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

[code type=css]

<input list=”browsers”>
<datalist id=”browsers”>
<option value=”Alpha”>
<option value=”Beta”>
<option value=”Gamma”>
<option value=”Tera”>
<option value=”Hexa”>
</datalist>

[/code]

 

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 to Shahbaz Ahmed Bhatti Cancel reply

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