Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

datalist

The <datalist> element is used to supply a list of data to another control on the page. The control simply needs to reference the id of the datalist.

Code Example

Input a flavor: <datalist id="flavors"> <option value="Chocolate">Chocolate</option> <option value="Strawberry">Strawberry</option> <option value="Vanilla">Vanilla</option> </datalist> <input list="flavors"> open in code editor

Attributes

globals - the global attributes common to all elements possible values: see global attribute list

Official Documentation

http://www.w3.org/TR/html/forms.html#the-datalist-element

HTML

Elements

aabbraddressareaasidearticleaudiobbasebdobdiblockquotebodybrbuttoncanvascaptioncitecodecolcolgroupdatadatalistdddeldetailsdfndialogdivdldtemembedfieldsetfigcaptionfigurefooterformh1 h2 h3 h4 h5 h6headheaderhrhtmliiframeimginputinskbdkeygenlabellegendlilinkmainmapmarkmetameternavnoscriptobjectoloptgroupoptionoutputpparampreprogressqrb rp rt rtc rubyssampscriptsectionselectsmallsourcespanstrongstylesub supsummarytabletbodytdtemplatetextareatfootththeadtimetitletrtrackuulvarvideowbr