Web Design

(Nancy Kaufman) #1

263


CHAPTER

Adding Forms to Your Site 11


● When the page is viewed in
the browser, the drop-down
list appears in the form.

7 Type


8 Type the text to display
in the list, followed by


.

9 Repeat Steps 7 and 8 to add
additional options.


0 Type .


7 8


10


9


TIPS


Can I allow my user to select more than one
option at a time?
Yes. You can add the multiple attribute to the
<select> tag. In HTML, you simply type
multiple; in XHTML, you need to write
multiple=”multiple”. You can also add a
size attribute, with a value set to the number of
options you want to have the list show without
scrolling.

How can I choose more than one option when I
have the multiple attribute set?
You can press and hold to select multiple
contiguous options. For noncontiguous selection,
you can press and hold on Windows or on
a Mac. You should provide these instructions on
your page for your users.
Free download pdf