Name

optgroup — <optgroup> . . . </optgroup>

Definiert eine logische Gruppe von options-Elementen. Die Browser könnten mit optgroup-Elementen hierarchische kaskadierende Menüs darstellen. Ein optgroup-Element darf keine anderen optgroup-Elemente enthalten (Schachtelung ist nicht erlaubt).

Attribute

Kern (id, class, style, title), Internationalisierung, Events

disabled="disabled"

Schaltet eine Gruppe von Optionen aus. Diese kann mit einem Skript wieder eingeschaltet werden.

label="Text"

Obligatorisch. Bestimmt das Label für die Optionsgruppe.

Beispiel

<p>Ihre Lieblingseissorten?<p>
<select name="Eis" size="6" multiple="multiple">
<optgroup label="traditionell">
   <option>Vanille</option>
   <option>Schokolade</option>
</optgroup>
<optgroup label="speziell"> ...

Get HTML & XHTML: kurz & gut 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.