Creates a drop-down list or list box element.
To add items to the select element, use the option tag.
The select tag allows simple or multiple selection, depending on the state of the MULTIPLE attribute.
You can set the count of the visible rows in a select tag with the size attribute. If the value of the size attribute is more than one, the appearance of the select tag is a list box.
<select>
<option selected="selected" value="none">None</option>
<optgroup label="Fruits">
<option selected="selected" value="Apple">Apple</option>
<option value="Pear">Pear</option>
<option value="Peach">Peach</option>
</optgroup>
<optgroup label="Vegetables">
<option value="Bean">Bean</option>
<option value="Cole">Cole</option>
</optgroup>
</select> <select name="fruit" size="3">
<option value="Apple">Apple</option>
<option value="Pear">Pear</option>
<option value="Peach">Peach</option>
</select>