HTML and CSS Reference
In-Depth Information
In this section, we describe the action buttons that you may create with
the standard form
<input>
element. In the next section, we describe in
detail the newer
<button>
tag that achieves identical effects and allows
you greater control over the presentation and display of your form but-
tons.
9.5.4.1. Submission buttons
The submit button (
<input type=submit>
) does what its name implies,
setting in motion the form's submission to the server from the browser.
You may have more than one submit button in a form. You may also
include
name
and
value
attributes with the submit type of form
<input>
button.
With the simplest submit button (one without a
name
or
value
attribute),
the browser displays a small rectangle or oval with the default label
"Submit." Otherwise, the browser labels the button with the text you in-
clude with the tag's
value
attribute. If you provide a
name
attribute, the
browser adds the
value
attribute for the submit button to the parameter
list and sends it along to the server. That's good, because it gives you a
way to identify which submit button in a form the user selected, letting
you process any one of several different forms with a single forms-pro-
cessing application.
All of the following are valid submission buttons:
<input type=submit>
<input type=submit value="Order Kumquats">
<input type="submit" value="Ship Overnight" name="ship_style" />
The first one is in HTML and is also the simplest: the browser displays
a button, labeled "Submit," which activates the forms-processing se-
quence when the user clicks it. It does not add an element to the para-
meter list that the browser passes to the forms-processing server and
application.