Skip to content

Instantly share code, notes, and snippets.

@spyesx
Created September 1, 2016 12:25
Show Gist options
  • Save spyesx/48d555d27fcbd508cd0074cbcce60877 to your computer and use it in GitHub Desktop.
Save spyesx/48d555d27fcbd508cd0074cbcce60877 to your computer and use it in GitHub Desktop.
Select empty at the beginning without user to be able to select an empty value after the first change. Good for custom placeholder/label.
<select name="">
<option selected disabled hidden style="display: none;" value=""></option>
<option value="option-1">Option 1</option>
<option value="option-2">Option 2</option>
</select>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment