Online Training for MVC Web Designing Development, MS SQL, Digital Marketing

HTML5 Datalist Tag Example

In this article you learn datalist tag <datalist></datalist> that you have never used in earlier HTML.

In datalist now you can have a list of data and associate the list with some text field.

datalist in html5

This is how you can write datalist tag
Enter country name
<input type="text" id="txtCountryList" list="dlCountryList">
<datalist id="dlCountryList">
<option value="India">
<option value="USA">
<option value="UK">
<option value="Australia">
<option value="Canada">
<option value="UAE">
<option value="Denmark">
<option value="Singapore">
<option value="South Africa">
<option value="Bangladesh">
<option value="China">
<option value="Germany">

Now you can implement auto complete feature of any textbox without writing any JavaScript code.

HTML5 Datalist Tag

Group Training