WML TAG:  optgroup

<optgroup> ... </optgroup>
 
The optgroup tag is used to group related option elements in a select list created using the select tag. A select list offers a selection of choices from which users may choose one or more items.
 
This tag delimits the beginning and end of each related group. 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.
 
An optgroup element can be nested inside of other optgroup elements. It cannot contain any other WML elements or any text (other than the text in the option elements).
 
Nested Tags:  optgroup  option
 
Attributes
 
class
The optional class core attribute is used to assign one or more classes to the element. Multiple classes are separated by white space. The class name is case sensitive (i.e., Stocks and stocks are not the same).
 
id
The optional id core attribute is used to assign an identifying name to a tag. The name must be unique to the entire deck and not just unique to a card. The first character of the name can be any letter or the underscore. The remaining characters can be any combination of letters, numbers, or underscores.
 
title
The optional title attribute provides a string or text used to describe or provide additional information about the list.
 
xml:lang
The optional xml:lang attribute sets the language, such as English or Greek, used in the element. For example, in the U.S. the default value is en-US.
 
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>


Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information