Creating a form


It is time for an exercise. To the HTML file you have been working on, create a form inside the table, similar to the example shown below.

<HTML>
<HEAD>
<TITLE>My Home Page</TITLE>
</HEAD>

<!-- Written by me -->
<!-- Created:  yesterday -->
<!-- Last modified:  today -->

<BODY>
<FORM ACTION="exer9.htm" METHOD="POST">
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="5">
<CAPTION>What Are Your Favorites</CAPTION>
<TR>
  <TH ROWSPAN="2">Web Site</TH>
  <TH COLSPAN="2">Foods</TH>
  <TH ROWSPAN="2">Cities</TH>
</TR>
<TR>
  <TH>Italian</TH> <TH>Fruits</TH>
</TR>
<TR>
<TD ALIGN="CENTER">
  Please enter your favorite Web Site<BR>
  <INPUT TYPE="TEXT"  NAME="web_site" 
  VALUE="http://" SIZE="16">
</TD>
<TD>
  Please enter your favorite<BR>
  <SELECT NAME="italian_food" MULTIPLE> 
  <OPTION VALUE="lasagna"> Lasagna 
  <OPTION VALUE="pizza"> Pizza
  <OPTION SELECTED VALUE="prosciutto"> Prosciutto
  <OPTION VALUE="ravioli"> Ravioli
  <OPTION VALUE="spaghetti"> Spaghetti 
  </SELECT>
</TD> 
<TD>
  Please enter your favorite<BR>
  <INPUT TYPE="CHECKBOX" NAME="fruit1" VALUE="apples"> Apples<BR>
  <INPUT TYPE="CHECKBOX" NAME="fruit2" VALUE="bananas"> Bananas<BR>
  <INPUT TYPE="CHECKBOX" NAME="fruit3" VALUE="cherries"> Cherries<BR>
  <INPUT TYPE="CHECKBOX" NAME="fruit4" VALUE="figs"> Figs<BR>
  <INPUT TYPE="CHECKBOX" NAME="fruit5" VALUE="grapes"> Grapes<BR>
  <INPUT TYPE="CHECKBOX" NAME="fruit6" VALUE="melon"> Melon<BR>
  <INPUT TYPE="CHECKBOX" NAME="fruit7" VALUE="nectarines"> Nectarines<BR>
  <INPUT TYPE="CHECKBOX" NAME="fruit8" VALUE="oranges"> Oranges<BR>
  <INPUT TYPE="CHECKBOX" NAME="fruit9" VALUE="papaya"> Papaya<BR>
</TD>
<TD> 
  Please enter your favorite<BR>
       Rio de Janeiro 
  <INPUT TYPE="RADIO" NAME="city" VALUE="rio"><BR>
       Paris 
  <INPUT TYPE="RADIO" NAME="city" VALUE="par"><BR>
       Venice 
  <INPUT TYPE="RADIO" NAME="city" VALUE="ven"><BR>
</TD>
</TR>
</TABLE>
<CENTER>
<INPUT TYPE="RESET" VALUE=" Erase ">
<INPUT TYPE="SUBMIT" VALUE=" Finished ">
</CENTER>
</FORM>
 
<P>

<DL>
<DT><STRONG>favorite</STRONG>
<DD>A person, or thing liked or prefered above all others; 
regarded with special favor; special.  Things I really like.
</DL>

</BODY>
</HTML>

Once you have added the form to your HTML file, run it to see if you get the same results I obtained.

Let's review this chapter.


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

Valid HTML 3.2!