Option Group | WebReference

Option Group

HTML 4.01 Element Reference

By Lee Underwood

Return to HTML 4.01 element index page

Name: Option Group

<optgroup> ... </optgroup>

Description: Defines a group of options within a selection list.

Browser Compatibility: NN: 6.0+ / IE: 6.0+

Attributes:
  • class
  • dir
  • disabled
  • id
  • lang
  • onclick
  • ondblclick
  • onkeydown
  • onkeypress
  • onkeyup
  • onmousedown
  • onmousemove
  • onmouseout
  • onmouseover
  • onmouseup
  • style
  • title

Code Example:

<select>
<optgroup label="colors">
    <option>Blue</option>
    <option>Green</option>
</optgroup>
</select>

Comments: This element should only be used within the <select> element.




Created: March 15, 2005

URL: http://webreference.com/html/reference/specs/