Why does this code not work? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why does this code not work?

I only changed two of the color names but even the original does not produce the pull down datalist. The original code only produces a box to receive input. input id="car" type="text" list="colors" /> <datalist id="colors"> <option value="Red"> <option value="Purple"> <option value="Blue"> </datalist>

6th Nov 2018, 12:27 AM
Vilanne Chalice
1 Answer
+ 1
It looks like your input tag is missing the opening <. Why don't you use this instead? <select> <option value="Red">Red</option> <option value="Purple">Purple</option> <option value="Blue">Blue</option> </select>
6th Nov 2018, 1:07 AM
Mike