I am working on a site where to measure sports popularity, there is a poll with an HTML select menu, where users can vote for their top favorite sport with options say "Cricket, Football, Basketball".
Now, when the user visits the page, the menu is shown, with "Sport1" selected/written by default. I know I can change it to any default SportN..
However, I want some plain text to appear. Like "Choose Your Favorite Sport". Which will not be an 'option' but just a text to show by default instead of an actual sport name. How can I do this?
In the given example - I can select any Sport to be shown by default in the menu. However, I want "Choose One" text to be shown instead of the option.
You would add the option and not assign it a value like this:
<select name="myDropDown"> <option value="" selected>Choose one: </option> <option value="/webpage1.html">Menu item 1</option> <option value="/webpage2.html">Menu item 2</option> <option value="/webpage3.html">Menu item 3</option> </select>