Show Disabled Select option by default in HTML
Are you wondering how to make a <select>
with the default option which is disabled?
Here is how:
<option selected="true" disabled="disabled">Your default, disabled option</option>
Full example:
The first, selected option will show as the default, but the user won’t be able to switch to it.
<select>
<option selected="true" disabled="disabled">Pick a color</option>
<option>Red</option>
<option>Blue</option>
</select>
Output: