HTML Forms Tutorial

Let's look at a very simple form:

This Code Makes This
<FORM ACTION="/cgi-bin/">
favorite color: <INPUT NAME="color">
favorite color: (Form is not live)

This form has all the required elements for a form:

<FORM ACTION="/cgi-bin/">
Start the form here. The ACTION attribute, which is required with every <FORM ...> tag, is used with CGI, discussed below.

<INPUT NAME="color">
Data entry field. <INPUT ...> creates most types of form fields, but <TEXTAREA ...> and <SELECT ...> also create certain types.

End the form here.

Of course, this form doesn't do much. You can type something into the one field, but that's it, nothing happens from there. In the next section, we expand the form a little.

Forms and CGI >