Selections (sometimes called "drop down menus") are another way to present choices on a form. Selections can be used for as many or as few items as you need. Each item can be selected or not selected, unlike radio buttons, where only one item from each group can be selected.

The tag for a selection looks like this (note the closing </SELECT>tag):
<SELECT NAME="testing">
<OPTION>Option 1
</SELECT>

You can add the modifier MULTIPLE to the select tag to enable multiple selections. The HTML would then look like this:


<SELECT NAME="testing" MULTIPLE>
<OPTION>Option 1
</SELECT>

For an example of the entire HTML script as we work through the remainder of these steps in this tutorial, you can view the actual form.


<HTML>
<HEAD>
<TITLE>
Web Diner Menu
</TITLE>
</HEAD>
<BODY>
<FORM ACTION="mailto:wdlaurie@aol.com" METHOD:"POST">
Hi, there, and Welcome to the Diner! What can we do for you today?
<P>
Would you like a seat at the <P>
<INPUT TYPE="radio" NAME="seating" VALUE="counter"> Counter?<BR>
<INPUT TYPE="radio" NAME="seating" VALUE="booth"> Or a booth?<BR>
<P>
What would you like to order?
<P>
<INPUT TYPE="checkbox" NAME="burger">Cheeseburger<BR>
<INPUT TYPE="checkbox" NAME="tuna">Tuna Melt<BR>
<INPUT TYPE="checkbox" NAME="eggsalad">Egg Salad Sandwich<BR>
<INPUT TYPE="checkbox" NAME="cheesesand">Grilled Cheese Sandwich<BR>
<INPUT TYPE="checkbox" NAME="blt">BLT Sandwich<BR>
<INPUT TYPE="checkbox" NAME="fries">Fries<BR>
<INPUT TYPE="checkbox" NAME="chips">Potato Chips<BR>
<P>
What would you like to drink?
<P>
<SELECT NAME="drinks" MULTIPLE>
<OPTION>Coffee <BR>
<OPTION>Tea <BR>
<OPTION>Tomato Juice <BR>
<OPTION>Root Beer Float<BR>
<OPTION>Vanilla Milkshake<BR>
<OPTION>Coke<BR>
<OPTION>Just water, thanks!<BR>
</SELECT>
</FORM>
</BODY>
</HTML>

The next tutorial will demonstrate how to add a text field to your form.

HTML for Forms ||| Radio Buttons ||| Checkboxes ||| Selections Text Fields ||| Submit & Reset ||| Decoding Forms ||| Web Diner Menu

All information copyright Web Diner Inc., 1997. Do not redistribute or repost this content.