input select in html code example

Example 1: html form select

<!-- O segundo valor estará selecionado inicialmente -->
<select name="select">
  <option value="valor1">Valor 1</option> 
  <option value="valor2" selected>Valor 2</option>
  <option value="valor3">Valor 3</option>
</select>

Example 2: html select

<label for="cars">Choose a car:</label>
<select name="cars" id="cars">
  <optgroup label="Swedish Cars">
    <option value="volvo">Volvo</option>
    <option value="saab">Saab</option>
    <option value="n/a" disabled>unavailable</option>
  </optgroup>
  <optgroup label="German Cars">
    <option value="mercedes" selected>Mercedes</option>
    <option value="audi">Audi</option>
  </optgroup>
</select>

Tags:

Html Example