+ 2

what does datalist do?

datalist

15th Jul 2016, 9:32 AM
manish rawat
manish rawat - avatar
4 Answers
+ 2
<datalist> element belongs to the category 'phrasing content' which defines the text and mark-up it contains. This element contains a set of <option> elements for the <input> element: <label>Choose a language from the list: <input list="languages" name="lang"></label> <datalist id="languages"> <option value="English"> <option value="Spanish"> <option value="Russian"> <option value="Chinese"> </datalist>
15th Jul 2016, 3:15 PM
ZinC
ZinC - avatar
+ 2
It's more like a <select> list. But with <datalist>, the options aren't predefined. You can fill in another option of yours. <datalist> is a new HTML5 element. It has other uses like choosing color from a color pop-up, date, time..
16th Jul 2016, 4:15 PM
ZinC
ZinC - avatar
0
Zinc has explained it all 👍
16th Jul 2016, 12:10 AM
Ozii
Ozii - avatar
0
so it's like radio button?
16th Jul 2016, 6:10 AM
manish rawat
manish rawat - avatar