Chapter 9: Review


In this chapter we learned about:

The <FORM> Tag. The <FORM> tag resides within the body of the HTML document. To create a form, first start with the <FORM> tag with the following basic syntax:
<FORM METHOD="GET or POST" ACTION="URL">
End the form with the </FORM> tag, because otherwise you will get errors in your HTML code. Note that you can have more than one form in a document but you cannot have nested forms.

Between the <FORM> tag and the </FORM> tag, you can have different types of input. These input tags provide the interface for the user to input data.


The text box allows for one line of text to be entered by the viewer. It uses the following syntax:

<INPUT TYPE="TEXT" NAME="name of variable" VALUE="value" SIZE="size" MAXLENGTH="length">


The text area allows for one or more lines of text to be entered by the viewer. It uses the following syntax:

<TEXTAREA NAME="name of variable" ROWS="number of rows" COLS="number of columns">


Radio buttons allow for only one selection. Radio buttons use the following syntax:

<INPUT TYPE="RADIO" NAME="name of variable" VALUE="value of variable"> text description


The checkbox syntax is very similar to that of radio, but you can have more than one selection. Here is the syntax:

<INPUT TYPE="CHECKBOX" NAME="name of variable" VALUE="value of variable"> text description


Another way to enter data is through a pop-up box, where you select from a list of choices. Here is the syntax:

<SELECT NAME="variable name" MULTIPLE SIZE="size">
<OPTION> text description
<OPTION SELECTED> text description
<OPTION VALUE="value"> text description
</SELECT>

Password type input is similar to that of the text box. Both allow for one line of text to be entered by the viewer. The difference is that the input is shown as asterisks. It uses the following syntax:

<INPUT TYPE="PASSWORD" NAME="name of variable" VALUE="value" SIZE="size" MAXLENGTH="length">


The hidden type input is one that is hidden from the user. It uses the following syntax:

<INPUT TYPE="HIDDEN" NAME="name of variable" VALUE="value">


It is always a good idea to allow the user to quickly clear the input. This is done using the following syntax:

<INPUT TYPE="RESET" VALUE=""text on button">


Once the user has input the data it is time to submit it. This type of input has the following syntax:

<INPUT TYPE="SUBMIT" VALUE="text on button">


This concludes the chapter on forms.

I am ready to go to the next chapter.


[INDEX] [PREVIOUS] [NEXT PAGE] [CHAPTER 9]

Valid HTML 3.2!