O'Reilly logo

Dynamic HTML: The Definitive Reference by Danny Goodman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

<OPTGROUP> — NN n/a IE n/a HTML 4

Synopsis

<OPTGROUP>...</OPTGROUP>

End Tag: Required

The OPTGROUP element offers the possibility that future browsers will provide a hierarchical SELECT element. An OPTGROUP element represents a container of OPTION elements. The LABEL attribute is the text that would appear in the main SELECT element listing, with nested OPTION elements cascading off the side when the OPTGROUP element is highlighted.

Example

<SELECT NAME="carCos">
    <OPTGROUP LABEL="American">
        <OPTION VALUE="General Motors">General Motors
        <OPTION VALUE="Ford">Ford Motor Company
        <OPTION VALUE="Chrysler">Chrysler Corporation
    </OPTGROUP>
    <OPTGROUP LABEL="Japanese">
        <OPTION VALUE="Toyota">Toyota
        <OPTION VALUE="Honda">Honda
        <OPTION VALUE="Nissan">Nissan
    </OPTGROUP>
</SELECT>

Attributes

CLASS

DISABLED

LABEL

LANGUAGE

TITLE

DIR

ID

LANG

STYLE

 

Event Handler Attributes

Handler

NN

IE

HTML

onClick

n/a

4

4

onDblClick

n/a

4

4

onKeyDown

n/a

4

4

onKeyPress

n/a

4

4

onKeyUp

n/a

4

4

onMouseDown

n/a

4

4

onMouseMove

n/a

4

4

onMouseOut

n/a

4

4

onMouseOver

n/a

4

4

onMouseUp

n/a

4

4

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required