You already know that in HTML there is no search option in the dropdown element.
When you press any single key in the dropdown then it takes you to the option but does not allow you to search whole or particular string.
Searching is required on the list when there is a long list of items that are available.
It is time-consuming to find the option by scrolling the list.
In this tutorial, I show how you create a dropdown with a search box using the select2 plugin and read the selected option.



