Support of Grouping items in select elements
It should be possible to group items in a select element.
<select name="pets">
<optgroup label="4-legged pets">
<option value="dog">Dog</option>
<option value="cat">Cat</option>
<option value="hamster" disabled>Hamster</option>
</optgroup>
<optgroup label="Flying pets">
<option value="parrot">Parrot</option>
<option value="macaw">Macaw</option>
<option value="albatross">Albatross</option>
</optgroup>
</select>
Links / references
- W3C - The select element: https://www.w3.org/TR/html50/forms.html#the-select-element
- MDN - The optgroup element: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup