HTML Reference
Attributes
label
Provides a caption for an element. If this attribute is not used, then it assume s the
value of the content of th e <option> element.
selected
This is a Boolean attribute a nd is specified without a value. If it is present, then the
option is initially put into the selected state.
value
Provides a value for an element. If this attribute is not used, then it assumes the value
of the content of the <option> element.
Examples
<!-- Offer to select one of the options with the Super King Size
Bed preselected. -->
<select name="select_a_bed">
<option value="compact">Compact Single Bed</option>
<option value="single">Single Bed</option>
<option value="compact_double">Compact Double Bed</option>
<option value="double">Double Bed</option>
<option value="king">King Size Bed</option>
<option value="super_king" selected>Super King Size Bed</option>
</select>
<!-- Offer to select any number of options. -->
<select size="3" name="order" multiple>
<option>Double Down</option>
<option>Pumpkin Spice Latte</option>
<option>Cherry Limeade</option>
<option>Beefy Crunch Burrito</option>
<option>Sweet Potato Fries</option>
</select>
<select>
Description
Represents a control for selecting between a set of possible
choices.
Content Zero or more <o ption> elements.
Display Inline
C.9. Forms 335