Web forms allow users to send data from their web browser to a server on the internet. The server receives the browser’s request, processes the data, may take other actions (send email, save data to database), and sends a response to the browser.

Creating forms

Insert a <form> tag.

— Set the tag’s action property to the URL of the server which will receive the data.

— Set the tag’s method to GET or POST

Insert <input> tags and other input-related tags inside the <form> tag.

Insert a Submit button, or use an image.

Importance of naming inputs correctly

Each of the <input> tags (and other input-related tags) must have its name property set to a specific name that the server requires.

Importance of method (GET or POST)

Set the form’s method property to GET or POST, depending on what the server requires.

Form input elements

<input> and related tags:

  • Text Field
  • Text Area
  • Checkbox
  • List/Menu
  • Radio Button
  • Button (Submit, Reset, Other)
  • Image Field

Special cases:

  • Hidden Field
  • File Field

More Information