HTML and CSS Reference
In-Depth Information
label="
text
text
"
Allows the author to provide a shorter label than the content of the option.
selected
(
selected="selected"
in XHTML)
Makes this item selected when the form is initially displayed.
value="
text
text
"
Defines a value to assign to the
option
item within the select control to use in place of
option
contents.
Example
<p>What are your favorite ice cream flavors?</p>
<select name="ice_cream" size="4" multiple="multiple">
<option>
Vanilla
</option>
<option>
Chocolate
</option>
<option>
Inside-out Rocky Road
</option>
<option value="pecan">
Praline Pecan Smashup
</option>
<option>
Mint Chocolate Chip
</option>
<option>
Pistachio
</option>
</select>