Forms: SELECT Boxes
Table of Contents:
The SELECT tag defines a field for display as a drop-down or a scrolling box.
Syntax:
|
<label for="...">...</label><br> <select id="..." name="..." size="..."> <option value="...">Option 1</option> <option value="...">Option 2</option> <option value="...">Option 3</option> ... Yadda, Yadda, Yadda ... </select> |
Definitions
NAME:
The NAME identifies the field.
SIZE:
The SIZE defines the number of options that are to be displayed at one time.
MULTIPLE:
You can also permit multiple items to be selected if you so choose. By holding the control key while clicking on an item you can then select more than one item in the list. The third list example has MULTIPLE turned on where you can try this. The change in the code would look like this:
| <select name="name" size="3" multiple> |
[Updated: Sunday, November 18, 2007]
