Next / Previous / Contents / TCC Help System / NM Tech homepage

14.6. The optgroup element: A group of choices inside a select control

Inside a select control, the optgroup element allows you to group options into categories. This can be useful when there are a lot of options. Instead of a sequence of option elements inside the select element, you use a sequence of optgroup elements, each of which in turn contains a sequence of option elements:

element optgroup
{ attribute label { text },
  Common.attrib,
  option+
}
label

This required attribute is the name of the category for this option group.

Common.attrib

Use any of the attributes described in Section 15.3, “The common attributes: Common.attrib.

option+

The content is a sequence of one or more option elements; see Section 14.5, “The option element: One choice inside a select control”.