HTML » Tags » optgroup

Version: 4.0

Compability: Netscape 6

<optgroup> ... </optgroup>

The <optgroup> tag is used to group together related items in a pull-down form control. An item can only be added to the group by using the option tag. Both the optgroup and option tags must be used inside the opening and closing select tags.

It is expected that future versions of HTML may allow this tag to create nested pull-down lists.
This tag is currently very poorly supported by browsers.
The closing tag is mandatory.


<optgroup label="Mexican tropical fish">
<option>Sword Tail</option>
<optgroup label="Goldfish">
Language(s): HTML

See Also: