HTML Reference Guide


Tag Index | Content List | HTML FAQ

<OPTGROUP> ... </OPTGROUP> OPTION GROUP

Description:

The OPTGROUP element allows authors to group selection list choices into a hierarchy. This is particularly helpful to non-visual user agents when large numbers of options are available to choose from. Possible rendering of this element could be a collapsible hierarchy list of OPTION element content or some presentatin conveying the hierarchy relationship of the OPTION contents. Browsers not supporting this element will "see" only a traditional flat list of OPTION elements. The LABEL attribute for this element is used to provide shorter labels for the nodes of the hierarchical menus.

Attributes:

disabled - This is a stand-alone attribute which indicates the element is initially non-functional.

label - This specifies a shorter alternate label for use in identifying the sub-group of options.

Example code:

<select NAME="Familytree"> <option LABEL="Bill" VALUE="bill">Bill Smith <option LABEL="Mary" VALUE="mary">Mary Smith <optgroup LABEL="Joe"> <option VALUE="michael">Michael Smith <option VALUE="susan">Susan Smith <option VALUE="howard">Howard Smith </optgroup> </select>

Result:

See Also:


  Free Web Pages | Super Links | Members Directory | Search | Privacy Statement | Site Map | Contact Us
Services: Create Free Web Page | Free Home Page | Free Web Page Builder
Free Web Page Templates | Free Web Sites | Free Web Space
Copyright © 1996 - 2006 WebSpawner.com. All rights reserved.