What is HTML DATALIST tag and How to use it?

Asked: Priya Bisvash


Vivek Madhur

HTML Tag <datalist> 

The <datalist> tag is new in HTML5, it is use to list predefined options for an input data element in HTML. It provides an autocomplete feature that allows selecting input from the predefined options.

Important Points of <datalist> Tag

  • <datalist> is a very useful tag with input tag.
  • It is combined with the input tag
  • <datalist> element provides suggestions whereas the select element asks the user to select a value from the available list.
  • In case, the <datalist> user has to enter values that are not in the list, it shows all data in that case.

Syntax Example of <details>

     <input  type="text" list="tutorials" />

     <datalist id="tutorials">

         <option value="C Programming"><option>

         <option value="Java Programming"><option>


Browser Support <datalist> Tag

  • Chrome: Yes
  • Edge: Yes
  • Firefox: Yes
  • Safari: Yes
  • Opera: Yes

0 votes

Your Answer

Email Us: advertise@gdatamart.com

Donate Us: Support to GDATAMART

© 2023 GDATAMART.COM (All Rights Reserved)