DATALIST (<datalist>) Tag

by Monika Dadool 20-Jun-19

0 653

The <datalist> tag  tells about auto-completion values for an <input> element. This tag specifies a file of predefined options which let users to select data or in other words we can say it permits to integrate an autocomplete feature on form. Firstly these options are invisible, this options becomes available as the user start typing in an input box.

The datalist tag is one of the latest tags found in HTML5. It is always found within pairs where the content is positioned between the beginning (<datalist>) and the ending (</datalist>) tags.


<!DOCTYPE html>
  <title>HTML Datalist Tag</title>
 <h3> Datalist Tag </h3>
  <label> Choose your Country </label>
  <input list="country"/>
  <datalist id="country">
    <option value="India"/>
    <option value="Singapore"/>
    <option value="Japan"/>
    <option value="United Kingdom"/>
    <option value="United States"/>


DATALIST (<datalist>) Tag


Leave a Reply

    Waiting for your comments