There are two HTML tags that will allow the visitors to your website who are using your forms to enter text. The first type of tag is for a short text field.

The tag for a short, single line text field looks like this:

<INPUT TYPE="text" NAME="test" SIZE="80">

Which would put a blank text field, 80 characters long, on the page. You can make the text field any length you like.

The second text field HTML code is made up of both an opening and a closing tag.

<TEXTAREA NAME="testing" ROWS="6" COLS="80"></TEXTAREA>

This tag would place a blank text field on the page that would hold eighty characters across and six lines of text.

For an example of the entire HTML script as we work through the remainder of these steps in this tutorial, you can see this form.


<HTML>
<HEAD>
<TITLE>
Web Diner Menu
</TITLE>
</HEAD>
<BODY>
<FORM ACTION="mailto:wdlaurie@aol.com" METHOD="POST">
Hi, there, and Welcome to the Diner! What can we do for you today?
<P>
Would you like a seat at the <P>
<INPUT TYPE="radio" NAME="seating" VALUE="counter"> Counter?<BR>
<INPUT TYPE="radio" NAME="seating" VALUE="booth"> Or a booth?<BR>
<P>
What would you like to order?
<P>
<INPUT TYPE="checkbox" NAME="burger">Cheeseburger<BR>
<INPUT TYPE="checkbox" NAME="tuna">Tuna Melt<BR>
<INPUT TYPE="checkbox" NAME="eggsalad">Egg Salad Sandwich<BR>
<INPUT TYPE="checkbox" NAME="cheesesand">Grilled Cheese Sandwich<BR>
<INPUT TYPE="checkbox" NAME="blt">BLT Sandwich<BR>
<INPUT TYPE="checkbox" NAME="fries">Fries<BR>
<INPUT TYPE="checkbox" NAME="chips">Potato Chips<BR>
<P>
What would you like to drink?
<P>
<SELECT NAME="drinks" MULTIPLE>
<OPTION>Coffee <BR>
<OPTION>Tea <BR>
<OPTION>Tomato Juice <BR>
<OPTION>Root Beer Float<BR>
<OPTION>Vanilla Milkshake<BR>
<OPTION>Coke<BR>
<OPTION>Just water, thanks!<BR>
</SELECT>
<P>
Anything else I can get you?
<INPUT TYPE="text" NAME="additional" SIZE="80"><BR>
<P>
Any special requests for our chef?
<TEXTAREA NAME="request" ROWS="4" COLS="80"></TEXTAREA>
<P>
</FORM>
</BODY>
</HTML>

You're nearly finished! The next tutorial explains how to add the Submit and Reset buttons to your form.

HTML for Forms ||| Radio Buttons ||| Checkboxes ||| Selections Text Fields ||| Submit & Reset ||| Decoding Forms ||| Web Diner Menu

All information copyright Web Diner Inc., 1997. Do not redistribute or repost this content.