SELECT menus
SELECT is used to define select one from many or many
from many menus. SELECT elements require start and end tags
and contain one or more OPTION elements that define menu
items. One from many menus are generally rendered as drop-down menus
while many from many menus are generally shown as list boxes.
Example:
<SELECT NAME="flavor">
<OPTION VALUE=a>Vanilla
<OPTION VALUE=b>Strawberry
<OPTION VALUE=c>Rum and Raisin
<OPTION VALUE=d>Peach and Orange
</SELECT>
SELECT attributes:
- name
- This specifies a property name that is used to identify the menu
choice when the form is submitted to the server. Each selected option
results in a property name/value pair being included as part of the
form's contents.
- size
- This sets the number of visible choices for many from many menus.
- multiple
- The presence of this attribute signifies that the users can make
multiple selections. By default only one selection is allowed.
OPTION attributes:
- selected
- When this attribute is present, the option is selected when the
document is initially loaded. It is an error for more than one option
to be so selected for one from many menus.
- value
- Specifies the property value to be used when submitting the form's
content. This is combined with the property name as given by the name
attribute of the parent SELECT element.