Working with Menus
A menu is very much like a list. The markup is nearly exactly the same, and you use menus to present a large number of options, just like a list. The main difference is that the options appear in a dropdown list, as in Figure 68.7.
Listing 68.7. View Source for Figure 68.7.
<form>
<table>
<tr>
<td>Select the newsletter you would like to receive:</td>
</tr>
<tr>
<td><select name="select">
<option value="news" selected>News</option>
<option value="sports">Sports</option>
<option value="business">Business</option>
<option value="entertainment">Entertainment</option>
<option value="humor">Humor</option>
<option value="style">Style</option>
<option value="travel">Travel</option>
<option value="science">Science</option>
<option value="culture">Culture</option>
</select></td>
</tr>
</table>
</form>
Figure 68.7. Use a menu instead of a list if you prefer the compact look of the menu.
[View full size image]
TIPYou should always preselect one option in a menu. Otherwise, the menu appears blank until the visitor opens the dropdown list. |