method attribute indicates which HTTP method to use when
communicating with the server (GET versus POST); POST is normally
used, and allows more form data than GET.
action specifies a URL to invoke when the form is submitted.
<input> elements: controls that allow the user
to enter data.
The type attribute specifies which of several controls to use.
text is a simple one-line text entry.
The name attribute associates a name with the information typed
by the user.
<input type="submit"> creates a button for submitting the form.
When the submit button is clicked:
A request is made to the URL given by the action attribute
of the <form> element.
The data entered by the user is included in the POST request as
name-value pairs using the names from the <input> elements.
The POST data is roughly analogous to query values in URLs, though
it is sent to the server slightly differently (in the body of the
request, not in the URL).
Server can return a new HTML page in response to the POST.
However, the correct behavior is for the server to redirect to a
different page, so the POST URL does not appear in the browser
history (problems with Back button).
Can preload the form elements with initial values, using value
and other attributes.