Introduction to HTML Forms

HTML forms allow creation of a "document" that involves remote processing on demand. Information entered into a form is submitted to a process as its imput. The process can be produced as any program or shell script. It accepts data from the form as its input, performs any processing specified by the developer, and sends output to files, other processes, and to the user of the form. This is a very powerful tool for producing applications that run over networks, invoke resources on a number of machines, and hide all the complexity from the user.

Here is a brief introduction to the tags that display forms in HTML.

Forms consist of

The HTML forms creation tags:


An important difference between radio boxes and checkboxes is this: In a radio box, the same NAME is used repeatedly, with different VALUEs for the different choices. Since only one value can be selected, there is no ambiguity about the value associated with the name. (The information sent to the program that processes the data is in the form fieldname=value)  In checkboxes, each value has a different name. Thus multiple instances of the same name will not occur when more than one selection is checked. (The information sent to the program is of the form choicename=on for each choice that is checked.)

To preselect (use a default), use CHECKED wherever we want.

Each of the form components above is demonstrated in a sample form that you can examine.

There are additional formatting considerations in forms design. Allowing the user of the form to select from options, rather than allowing free text input,  helps get  input that is consistent and easy to process. However, long lists can take up a lot of space and distract from the imporant features of the form.  Selection lists provide a menu of choices, but the space they use can be controlled by the form designer. Selection lists may be defined as pop-up list or as scrolling lists. The selection is defined with the following tags:

   < SELECT NAME="itemname">
    < OPTION> Choice one
     < OPTION>Choice two
     < OPTION>Choice three
   </SELECT>
Options to change the way selections are displayed:
Lillian N. (Boots) Cassel

Department of Computing Sciences
Villanova University
Villanova, PA 19085-1699
+1 610 519 7341

cassel@vill.edu
22 January 1996
Revised 06 September 2000