in HTML by
What is datalist tag?

1 Answer

0 votes
The HTML 5 datalist tag provides an autocomplete feature on the form element. It facilitates users to choose the predefined options to the users to select data.


 Enter your favorite cricket player: Press any character<br />    

 <input type="text" id="favCktPlayer" list="CktPlayers">    

 <datalist id="CktPlayers">    

 <option value="Sachin Tendulkar">    

 <option value="Brian Lara">    

 <option value="Jacques Kallis">     

 <option value="Ricky Ponting">     

 <option value="Rahul Dravid">     

 <option value="Shane Warne">     

 <option value="Rohit Sharma">     

 <option value="Donald Bradman">     

 <option value="Saurav Ganguly ">     

 <option value="AB diVilliers">     

 <option value="Mahendra Singh Dhoni">     

 <option value="Adam Gilchrist">    



More details.