WML » Tags » select

Syntax:
<select> ... </select>

The select tag is used to create a select list. A select list offers a selection of choices from which you may choose one or more items.

This tag delimits the beginning and end of the select list. It also serves as a container element for a collection of option elements where each option element contains one item to be displayed in the list.
 
Further, you can group related items (option elements) together into sub-listings using optgroup elements. The browser usually allows you to display one optgroup element at a time.
 
A select element cannot contain nested select elements. It can only contain optgroup and option elements.
 
Nested Tags:  optgroup  option

Examples

Code:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.WAPforum.org/DTD/wml_1.1.xml">
<wml>
<card id="ic" title="Ice Cream">
<p>
Click Select<br />
<select name="favorite" title="Pick your favorite!">
   <optgroup title="Future Flavors">
      <option value="cd">Coconut Delight</option>
      <option value="cf">Coffee</option>
      <option value="mns">Maple Nut Swirl</option>
      <option value="rs">Raspberry Sorbet</option>
   </optgroup>
   <optgroup title="Unpopular Flavors">
      <option value="cpr">Cinnamon Prune </option>
      <option value="gb">Green Bean </option>
      <option value="nunu">Nutty Nutmeg</option>
   </optgroup>
</select>
</p>
</card>
</wml>
Explanation:

This example demonstrates the use of the select tag to create a select list.

Language(s): WML

See Also: