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

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.