Web Design / HTML

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

Using Forms and CGI

By Jennifer Kyrnin, About.com

2 of 6

The Form

A form has three required elements:

  1. <form>...</form>
    The element that creates the form. This element has two attributes, method and action. The method is either post or get, and I will explain these in a future article. The action is a URL pointing to the CGI script that will run on the form data.

  2. <input />
    The element that generates the data for the form. For this simple form, we will use the input type of text.

  3. <input type="submit" />
    This is actually a sophisticated form of the <input /> element, but in order for a form to be sent to the CGI, you must have this element.

2 of 6

Explore Web Design / HTML

More from About.com

Web Design / HTML

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. About.com Web Design A to Z
  5. Web Design Articles R-Z
  6. Web Design/HTML Articles U
  7. Using Forms and CGI

©2008 About.com, a part of The New York Times Company.

All rights reserved.