262
Create a Drop-Down List .........................................
4 Type <select name=”?”,
replacing? with a descriptive
name for the list.
5 Type id=”?”, replacing?
with the value you used for
the attribute in Step 2.
6 Type >.
1 In your editor, open an HTML
page that contains a form.
2 Within the form, type
<label for=”?”>,
replacing? with the ID you
plan to use for the list.
3 Type label text and
</label>.
Create a Drop-Down List
Y
ou can create a drop-down list in HTML with a combination of the <select> tag and its child
<option> tags. The <select> tag contains the name and, if necessary, the ID. Each choice
within the drop-down is provided with an
the text within the
the server from that which the user sees, you can optionally add a value attribute to the tag. A
select list can contain as many options as you need.