Search Options
The
<datalist> tag can be used to define a list of pre-defined options for the search field:
<input id="car" type="text" list="colors" />
<datalist id="colors">
<option value="Red">
<option value="Green">
<option value="Yellow">
</datalist>Try It Yourself
Result:
<option> defines the options in a drop-down list for the user to select.
The ID of the datalist element must match with the list attribute of the input box.
Comments
Post a Comment