contents.gifindex.gifprev1.gifnext1.gif

pueblo00000000.gif <select>...</select>

The Select element allows the user to chose one of a set of alternatives described by textual labels. Every alternative is represented by the Option element. The Select element is rendered as a pop-up list.

Attributes

MULTIPLE

The MULTIPLE attribute is needed when users are allowed to make several selections, e.g. <select multiple>.

NAME

Symbolic name used when transferring the field’s contents.

SIZE

Specifies the number of visible items. If this is greater than one, then the resulting form control will be a list.

Examples

The following example defines a form that contains a single <select> element and a submit button:

<form method=post action="http://www.chaco.com/htbin-post/post-query">

What would you like to do today?

<select name="what-to-do">

<option>Drink Coffee

<option selected>Use Pueblo

<option >Use VR Scout

<option >Read A Book

<option>Take A Walk

<option>Buy A Bagel

</select>

<input type=submit value=" Enter my agenda ">

</form>

Also see

<form>

<option>

<input>