set default of select code example

Example 1: default select option

<select>
  <option value="" selected disabled hidden>Choose here</option>
  <option value="1">One</option>
  <option value="2">Two</option>
  <option value="3">Three</option>
  <option value="4">Four</option>
  <option value="5">Five</option>
</select>

Example 2: html select default

<label for="cars">Choose a car:</label>
<select name="cars" id="cars">
  	<option value="volvo">Volvo</option>
    <option value="saab" selected>Saab</option>
</select>

Tags:

Html Example