This tutorial will teach you how to create a dropdown list. Dropdown selection can be used in many ways. You could use radio buttons in their place, however, dropdowns are suited to certain situation where one has to select something. For example, shirt size.
The < SELECT> Tag
      Threw a curve ball at you. INPUT tags don't work for this one. Instead the select tags tell the browser that a selection needs to be made from the options presented. You therefor list all the options using the < OPTION> tag.
Take a look at the general form. It will clear up any problems:
< SELECT SIZE = "size" NAME = "name" MULTIPLE>
< OPTION VALUE = "Value">Text shown
< OPTION VALUE = "Value">Text shown
< OPTION VALUE = "Value">Text shown
</SELECT>
Properties of the dropdown:
Size = "Size" MULTIPLE VALUE="value" Name = "name"
Describes how many choices are shown
Allows the user to select more than one choice
Value sent to the CGI script
Name of the check box sent to the script
The Code
The Result
Select Your Shirt Size
FOR DEMONSTRATION ONLY!!
If SIZE = 4 (only 4 choices remember)
FOR DEMONSTRATION ONLY!!
A couple things to remember about dropdowns:
We must put something after the option tag to display it to the visitor.
If you insert MULTIPLE in the SELECT tag it will allow more than one choice to be selected.
Don't forget to fill in the VALUE and NAME properties.
Rate Tutorial:
12345
Rated: 0 out of 5 Votes: 0
Let's look at the beginnings of HTML code. Continue to General Form