HTML and CSS Reference
In-Depth Information
The purpose of the selection menu dictates which type of selection menu should be
used and the HTML code required to create that select control. Using the basic tags and
attributes shown in Figure 6-16, you can create a wide variety of selection menus to suit
almost any purpose.
Options
The <select> and <option>
tags are useful when you
have a limited number
of choices from which
a Web page visitor can
select. If the number of
options becomes too
large, however, the list is
difficult to read. A better
idea might be to group
together like options into
submenus. You can use the
<optgroup> tag before
the first <option> tag in
the first group that you
want to use in a submenu.
After the last option in
that group, use the
</optgroup> tag.
simple selection menu
with default values
three choices or
options appear in
menu at startup
multiple choices or
options possible
for selection
Yellow is
selected
as default
Figure 6-16 HTML code to create selection menus.
To Add an Additional Text Box
The next step in creating the Web page form is to add one more text box for an
Internet radio station not listed in the selection menu. You again use the nonbreaking
space (&nbsp;) special character to move the text box over more than one space from the
 
Search WWH ::




Custom Search