About datalist and option tags
I have a question, why when we make a datalist we write <datalist id="name"> <option value="Alex"> </datalist> <input id="names" type="text" list="name"> And not <datalist id="name"> <option value="Alex"> </datalist> <input id="names" type="text" list="#name"> ?? I thought we used # to reference an id Also, why when I remove the id="names" from input it doesn't work anymore? Also, when we want to make a list of options for <select> tag why do <option> tags need a closing tag like this: <select> <option value="Alex"> Alex </option> </select> While using option tag in a datalist it works just fine with only value, when we use it in select tag I need to also write the value between <option> and </option> for some reason, can someone explain?