QUESTION: What is an HTML form?

ANSWER: An HTML form is an HTML file containing boxes where the user can type text, lists from which the user can select particular items, boxes the user can check, buttons the user can click, etc.

The mechanism that allows a user to interact with an HTML form is part of the user's Web browser. The main components of this mechanism are the HTML interpreter and other software that interprets scripts that might be contained in the HTML code.

HTML interpreter: this translates HTML code into text and graphics and displays the text and graphics in the user's Web-browser window; it also manages the interactive process that takes place when a user is typing text and making selections on an HTML form.

Other software that interprets scripts: other software within the Web browser deals with scripts that might be embedded in the HTML code. Scripts are small programs that handle tasks such as data validation; dynamic display of text & graphics; and dynamic display of form elements like text boxes, lists, and buttons. Conventionally, several different languages are used to write scripts contained in HTML code. One of the most popular languages is JavaScript.

HTML forms are often used to collect information from users via the Internet or via an Intranet. In these cases, a Web server sends the HTML forms out over the Internet or Intranet to a Web browser on a user's computer, and the HTML forms are displayed in the Web-browser window.

Most HTML forms contain a button that a user is supposed to click when he has finished filling out the form. In the typical case, the data that was entered by the user and the selections that were made by the user are sent over the Internet or Intranet to a Web server when the user clicks this button. Software on the Web server then takes control and uses the data as required. 

For example, the software on the Web server might use the data to generate another HTML form that is sent to the user's Web browser. An example of this is the checkout process you go through when you're purchasing something on line. Once your items are in your cart, you are typically asked to enter several kinds of information on subsequent HTML forms. Maybe you are asked first to enter your shipping address; after you enter it, you get another HTML form asking for your billing address. After you enter your billing address, you get another HTML form asking for your credit-card information. After you enter your credit-card information, you get another HTML form instructing you to review everything for accuracy. Once you've clicked a button signifying that everything is okay,  you get another HTML form thanking you for your order.

HTML forms vs. PDF forms

Using HTML forms is the conventional method for collecting data from users on the Internet or on an Intranet. However, in some situations it makes sense to use PDF forms instead of HTML forms.

How do you create an HTML form?
There are many sources of information about HTML and HTML forms on the Internet. Just use your favorite search engine to search for "Web development" — you'll get lots of hits. If you invest some time in learning about HTML, you can use any text-editing application or word-processing application to create HTML forms. For example, on a Windows computer, you can use Notepad or Notepad+ or Microsoft Word. Or if you like, you can use software designed specifically for HTML editing; HTML Kit is one example.  Note that you'll need to make sure you save your HTML forms in plan-text (ASCII) format. You'll also want to give the files an .html or .htm filename extension, because software that deals with HTML files (such as Web browsers and Web servers) expects them to be named that way.

If you don't want to spend time learning about HTML code, you'll need to use software known as a "Web-development tool." Such software lets you use a drag-and-drop approach for creating HTML code, whether your files are HTML forms or just plain HTML files. The software generates HTML code automatically, behind the scenes, so you don't have to write the code yourself. It also allows you to create special visual effects and audio effects more quickly and more easily than you could if you were using a regular text editor or word processor. Examples of Web-development tools are Wix and Wordpress.

See also What is HTML?