HTML and CSS Reference
information are included in the form. The easier that it is for a user to complete a form,
the more likely it is that he or she will complete it. A fieldset control is created with the
following code; note that the ... in the code indicates the area in which various input
controls would be coded:
Figure 6-5 Fieldset and textarea controls.
The submit control and the reset control create the Submit and Reset buttons,
respectively (Figure 6-6). The Submit button sends the information to the appropriate
location for processing. The Reset button clears any input that was entered in the form,
resetting the input controls back to the defaults. A Web page form must include a Submit
button, and most also include a Reset button. The submit and reset controls are created
with the following code:
<input type=”submit” value=”Submit” />
<input type=”reset” value=”Reset” />
Figure 6-6 Submit and Reset button controls.
Regardless of the specific type, each input control has one or two attributes that are
used more frequently than the others:
, which identifies the specific information that is being sent when the form is
submitted for processing. All controls have a name.
, which is the type of data that is contained in the named input control (that
is, the data that the Web page visitor enters). All controls except textarea also have a
value attribute. For a textarea field, no value attribute is possible because of the
variability of the input.
When a Web page visitor clicks the Submit button on the form, both the control name
and the value of the data contained within that control are sent to the server to be processed.