Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project









TAG:  optgroup

<optgroup> ... </optgroup>
Available in versions: 4.0
Browser compatibility: Netscape 6
 
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
 
disabled
The disabled attribute is used to disable the caption group. The only permitted value is disabled.
 
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 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information