select element in html code example
Example 1: html form select
<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: select html
<select class="form-control">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
Example 3: html select list
<label for="cars">Choose a car:</label>
<select id="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
Example 4: html create drop down list
<html>
<head>
<title>Selection Inputs</title>
</head>
<body>
<form>
<label for="selector">
<p>A "select" element allows users to input from a selection:</p>
<select id="selector">
<option>Option 1</option>
<option>Option 2</option>
<option selected>Option 3</option>
<optgroup label="Group">
<option>Option 4</option>
<option>Option 5</option>
</select>
</label>
</form>
</body>
</html>
Example 5: 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>