HTML - Tags - <datalist>

#33 of 147
Next dd
Prev data

     <label>Select your country:</label>
     <input list="country-list" />
     <datalist id="country-list">
         <option>United Arab Emirates</option>
         <option>United Kingdom</option>
         <option>United States</option>

The datalist element contains a list of option elements that can be used by the input element to create an autocomplete control with a dropdown list.

A live example:

See also: option optgroup

N of

Ads by Google

Ask a question, send a comment, or report a problem - click here to contact me.

© Richard McGrath