HTML and CSS Reference
In-Depth Information
selection menu. Table 6-9 shows the HTML code used to add the additional text box. A
text field is used rather than a textarea field because the user needs to enter only one row
of characters.
Table 6-9 HTML Code to Add Additional Text Boxes
HTML Tag and Text
   Name station not listed:
<input name="additstation" type="text" size="30" maxlength="30" />
The following steps add an additional text box to the Web page form.
Check that the insertion point is on Line 47, indented one Tab stop.
Enter the HTML code shown in Table 6-9 and then press the e n t e r key twice
(Figure 6-17). Align the insertion point at the beginning of Line 50.
size and maxlength set
to the same dimension
insertion point
on line 50 with
no tabbing
text control name
type set to text
Figure 6-17
One good use of forms is
to get feedback from your
visitors. Suggestions from
visitors not only can help
improve the Web site, but
can give your visitors the
sense that you care about
their opinions. Taking
visitor feedback into
account leads to better
customer satisfaction.
Adding a Textarea Box
A textarea box is added next. Remember that a textarea is used when you want a
multiple-row input area. The text control only allows a user to input one row of informa-
tion. For multiple rows, use the textarea control.
The form includes a textarea that allows the user to add additional comments about
their music preferences. Because the response can be longer than just one line, a textarea
control is used.
To Add a Textarea Box
The next step is to add a textarea to the form. You use a textarea because you want the user to be able to
input more than one line. Table 6-10 contains the tags and text to specify a textarea for multiple-line input.
Table 6-10 HTML Code to Add a Textarea
HTML Tag and Text
<br />What else can you tell us about your music preferences?
<br /><textarea name=”other” rows=”3” cols=”100”></textarea>
Search WWH ::

Custom Search