HTML Tutorials
HTML Forms
HTML Basics

HTML Forms

Structured Form Input

Dropdowns with the select tag

In this section we did a dropdown for the states. Dropdowns use the <SELECT> tag. Inside the <SELECT> tag the <OPTION> tag is used to create the list of options in the dropdown box.

State:
State: <SELECT NAME="state">
<OPTION VALUE="AL">Alabama
<OPTION VALUE="AR">Alaska
<OPTION VALUE="AK">Arkansas
.
.
.
</SELECT>

Here we have another <SELECT> but instead of a dropdown we have a box. The way we can tell is the SIZE component. There is another option.that isn't shown here. If you add the component MULTIPLE ex. <SELECT NAME="income" SIZE="10" MULTIPLE> you can select multiple items in the box. You select more with the shift and control keys.

Income: Income: <SELECT NAME="income" SIZE="6">
<OPTION VALUE="1">Less Than $10,000
<OPTION VALUE="2">$10,000-$25,000
<OPTION VALUE="3">$25,000-$50,000
<OPTION VALUE="4">$50,000-$100,000
<OPTION VALUE="5">$100,000-$1,000,000
<OPTION VALUE="6">More Than $1,000,000
</SELECT>
Basic Syntax <<  1 2 3 4  >> Checkboxes and Radio Buttons
New Content