<optgroup> ... </optgroup>
Available in versions: 4.0
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.
Core Attributes
class
dir
id
lang
onclick
ondblclick
onkeydown
onkeypress
onkeyup
onmousedown
onmousemove
onmouseout
onmouseover
onmouseup
style
title
Attributes
label
The label attribute is used to specify a short caption.
Code:
<select>
<optgroup label="Mexican tropical fish">
<option>Molly</option>
<option>Platy</option>
<option>Sword Tail</option>
</optgroup>
<optgroup label="Goldfish">
<option>Comet</option>
<option>Common</option>
<option>Sarasa</option>
</optgroup>
</select>
Output:
Copyright 2000 by Infinite Software
Solutions, Inc.
Trademark Information
|