|
July 16, 2001, revised December 6, 2002 Grouping Menu Entries Tips: July 2001
Yehuda Shiran, Ph.D.
|
|
The latest browsers (Mozilla 1+, Netscape 6+, Internet Explorer 6+) support a new HTML tag: OPTGROUP. Use it to group selection alternatives in a SELECT element. Try this example:Here is the HTML code:
We now have two objects on this page:
Click here to disable the
Beware of browser differences when using this new tag, however. In Netscape 6.x, groups are displayed but there is no visual difference to the user when a group is disabled. Additionally, if an item had previously been selected in a now disabled group it will still be visible as the selected option. This latter point is also true for Netscape 7 and Mozilla, though those browsers do change the color of a disabled group to indicate that it is disabled. Finally, in Internet Explorer 6 the
People who read this tip also read these tips: Look for similar tips by subject: |