untitled
viviti
 HTML Amigo HomeHome
 HTML
   Introduction to HTML
   Using Notepad
   General Form
   Meta Tags
   Text Formatting
   Lists
   FTP
   Links
   Tables
   Images/Multimedia
   Frames
   Forms
     General Form
     Text Boxes
     Checkboxes
     Radio Buttons
     Dropdowns
     Textarea
     A Note About Forms
   Style Sheets
   Javascript
   Web Hosting
   Special Characters
   Glossary
 Help Forums
   HTML Help Forum
Fast connection
   HTML Help Forum
Slow connection
 Extra (Important) Stuff
   Comments
   Link To Us
   Web Tools
   Resources
   The Poll Page


Making Dropdown Lists

      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:

  1. We must put something after the option tag to display it to the visitor.
  2. If you insert MULTIPLE in the SELECT tag it will allow more than one choice to be selected.
  3. Don't forget to fill in the VALUE and NAME properties.
Rate Tutorial:
12345
Rated: 0 out of 5
Votes: 0
Free Email Forms from Bravenet.com

Let's look at the beginnings of HTML code. Continue to General Form



© HTML Amigo 2005


Web Hosting · Blog · Guestbooks · Message Forums · Mailing Lists
Easiest Website Builder ever! · Build your own toolbar · Free Talking Character · Email Marketing
powered by a free webtools company bravenet.com