Using Form Menus
Two types of form menus exist: drop-down and list. Both are extremely useful and can be modified in numerous ways to suite a range of needs.One of the most popular means of providing options in forms is the all-familiar drop-down menu. Menus of this sort are especially helpful when you have numerous options, and they are typically seen in standard menus for states, countries, pricing and so on.Drop-down menus are created by combining your selections with the select and option elements (see Example 5-8).
Example 5-8. A drop-down form menu
Figure 5-7 displays the drop-down menu.
<form method="get" action="http://www.myserver.com/cgi-bin/mailscript/">
<p>State (U.S. Western Region):</p>
<select>
<option value="Arizona">Arizona</option>
<option value="California">California</option>
<option value="Colorado">Colorado</option>
<option value="Nevada">Nevada</option>
<option value="Texas">Texas</option>
<option value="Utah">Utah</option>
</select>
</form>
Figure 5-7. Selecting from a drop-down form menu.

This causes Nevada to appear as the default selection in a drop-down form menu (see Figure 5-8).
<option value="Nevada" selected="selected">Nevada</option>
Figure 5-8. Use the select attribute to create a default selection in a drop-down menu.

You can add a selected attribute to any option you'd like selected by default. An additional feature with list menus is to offer multiple selections.Simply add the multiple attribute to the opening select tag:
<select size="6">
The menu now becomes a menu list, allowing your visitor to make multiple selections (see Figure 5-9).
<select size="6" multiple="multiple">
Figure 5-9. A menu list with multiple options selected.
