form select option 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: js select option in form

<form name="AddAndEdit">
   <select name="list" id="personlist">
      <option value="P1">Person1</option>
      <option value="P2">Person2</option>
      <option value="P3">Person3</option>
   </select>
</form>

Example 3: Form (Select : Option)

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

  
 <option value="saab">Saab</option>
  <option value="fiat">Fiat</option>

  
 <option value="audi">Audi</option>
</select>

Tags:

Html Example