John and Judy's family tree:
<
select
name="Familytree">
<
option
label="Bill"
value="bill">Bill Smith
</
option>
<
option
label="Mary"
value="mary">Mary Smith
</
option>
<
optgroup
label="Joe">
<
option
value="michael">Michael Smith
</
option>
<
option
value="susan">Susan Smith
</
option>
<
option
value="howard">Howard Smith
</
option>
</
optgroup>
</
select>
- Parent Model
- <select> | <optgroup>
- Content Model
- <option> | <optgroup>
Tips & Tricks
Browser Peculiarities
- [Test]
IE6: IE seems to need OPTION elements to be explicitly closed for the OPTGROUP
element to work correctly. In HTML though, end tags for OPTION are,
well..."optional", so this just seems to be a bug (Note: in XHTML the closing
tags are NOT optional.)
Boring Copyright Stuff...