This browser does not support basic Web standards, preventing the display of our site's intended design. May we suggest that you upgrade your browser?

HTML Coding

Forms-Quick Reference

Note: The HTML pages are out-of-date and will not be updated.

Forms are useful for capturing information from people who visit your site. A comprehensive table of codes used to create forms are listed below. This is a great printout for quick help. For a quick reference to required and optional form fields, see the Composite Table of Required and Optional Form Fields.

return to topBasic Form Tag and Attributes

The following table lists the FORM tag and the two necessary attributes used within that tag.

On Off Purpose/Explanation
<FORM> </FORM> Marks the beginning and end of the form. Requires the METHOD and ACTION attributes
METHOD="POST" Defines the process the server will use to act on the form. Options are GET and POST. POST is the method most commonly used.
ACTION="url" Indicates the name and address (url) of the script to be executed after the SUBMIT button is selected. For UWEC web publishers, this url is: /scripts/formmail/formmail.pl

EXAMPLE:
<FORM METHOD="POST" ACTION="url">
HTML codes for field prompts go here
</FORM>

return to topInput Field Tag and Attributes

The table below lists the INPUT tag and the attributes used within that tag.

On Purpose/Explanation
<INPUT> Signals an input field. Within this tag is the TYPE code, which specifies the kind of field that will be used.
TYPE=" " Determines the type of input field. Options are TEXT, CHECKBOX, RADIO, PASSWORD, SUBMIT, and RESET.
TYPE="TEXT" Displays space for one blank line of text. Sample coding:

<INPUT TYPE="TEXT" NAME="College">

TYPE="CHECKBOX" Displays option boxes to be checked by the user when multiple selections are possible. Sample coding:

<INPUT TYPE="CHECKBOX" NAME="CollArt">

TYPE="RADIO" Displays option circles to be clicked by the user when only one selection is possible. Sample coding:

<INPUT TYPE="RADIO" NAME="College" VALUE="Artsands"> Arts and Sciences

TYPE="PASSWORD" Displays space similar to TEXT, but characters are shielded. Sample coding:

<INPUT TYPE="PASSWORD" NAME="Password" MAXLENGTH="8">

TYPE="SUBMIT" Displays a button for sending information. The SUBMIT field must be used in all forms. Sample coding:

<INPUT TYPE="SUBMIT" VALUE="Send Information">

TYPE="RESET" Resets all fields to their default values. Sample coding:

<INPUT TYPE="RESET" VALUE="Clear Form">

MAXLENGTH="n" Sets the length of the text and password input fields
NAME=" " Names the information being sent to the server. The user does not see this name on screen. The SUBMIT and RESET buttons are the only fields that do not use the NAME code.
VALUE=" " Differentiates between input fields that have the same name. Also used to specify text for the SUBMIT and RESET buttons.

Each of the above examples is explained in more detail in the Web Publishing Series document on Input Fields.

return to topPull-Down Menus, Scrolling Lists, Multi-Line Fields, and Attributes

The table below includes the coding for the advanced features of pull-down menus, scrolling lists, and multi-line fields.

Field Type On Off Purpose/Explanation
Pull-Down Menu <SELECT
NAME=" ">
</SELECT> Pull-Down menus ask the users to respond with one specific answer. Each option for the list is coded with the <OPTION> tag. Sample coding:

<B>Select a fruit:</B> <BR>
<SELECT NAME="Fruit">
<OPTION SELECTED> Apples
<OPTION> Bananas
<OPTION> Oranges
</SELECT>

Scrolling List <SELECT
NAME=" "
SIZE="n"
MULTIPLE>
</SELECT> Scrolling lists allow users to select from a multiple list of options. The SIZE attribute controls how many items are displayed in the window. The user can select multiple items by using shift- control- or command- click combinations. Sample coding:

<B>Select some fruit:</B> <BR>
<SELECT NAME="Morefruit" SIZE="4" MULTIPLE >
<OPTION SELECTED> Apples
<OPTION> Bananas
<OPTION> Oranges
<OPTION> Watermelon
<OPTION> Kiwi
<OPTION> Cantaloupe
<OPTION> Strawberries
</SELECT>

Multi-Line Fields <TEXT AREA NAME=" "
ROWS="n"
COLS="n">
</TEXT AREA> Text boxes with multiple lines allow users to provide responses that aren't limited to one line.The number of rows and columns can be adjusted to fit your web page as needed. Any title you want to put on the text box should go before the <TEXT AREA> tag. If there is text that you want in the text box, type it between the <TEXT AREA> and </TEXT AREA> tags. This text can be deleted by the web page user, although it will reappear each time the page is opened. Sample coding:

<B>What are your ideas?</B> <BR>
<TEXTAREA NAME="Comments" ROWS="5" COLS="100"> Comments: </TEXTAREA>

Each of the above examples is explained in more detail in the Web Publishing Series document on Pull-Down Menus, Scrolling Lists and Multi-Line Fields.

Excellence. Our Measure. Our Motto. Our Goal.