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 Check Boxes

      In this tutorial you will be able to make check boxes. Check boxes are used when more than one answer can apply. For example, "Which foods do you like from the list below?" implies that you may select, all, or some of the answers provided.

The < INPUT> Tag

      We already discussed what the input tag is (Allows you to put fields that input information). Now, however, instead of the Type property being TEXT it will be CHECKBOX.

Check boxes take the following general form:

< INPUT TYPE = "CHECKBOX" Name = "samename" VALUE = "Value">
< INPUT TYPE = "CHECKBOX" Name = "samename" VALUE = "Value">
< INPUT TYPE = "CHECKBOX" Name = "samename" VALUE = "Value">

Properties of the checkbox:

TYPE = "CHECKBOX"
CHECKED
VALUE="value"
Name = "name"
Look everyone!! I'm a check box.
Allows you to select a choice by default
Value sent to the CGI script
Name of the check box sent to the script

The Code


The Result

Which Foods Do you Enjoy?

Pizza
Jerk Chicken
Ice Cream
All
FOR DEMONSTRATION ONLY!!

Looking at the code we notice:

  1. We must put something after the check box to let the visitor know what it is.
  2. If you insert CHECKED into the Input tag it will select that choice by default.
  3. The name always stays the same.
  4. The VALUE and NAME properties should be filled in, for any form type, because it will link to a script that emails you the results (SEE A NOTE ABOUT FORMS)
Rate Tutorial:
12345
Rated: 0 out of 5
Votes: 0
Free Email Forms from Bravenet.com

Continue to Radio Buttons




© 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