Defines an option group. This
element allows you to group choices. When you have a long list of
options, groups of related choices are easier to handle.
Differences Between HTML 4.01 and HTML 5
NONE
Example
Source
Output
<select>
<optgroup label="Swedish Cars">
<option value ="volvo">Volvo</option>
<option value ="saab">Saab</option>
</optgroup>
<optgroup label="German Cars">
<option value ="mercedes">Mercedes</option>
<option value ="audi">Audi</option>
</optgroup>
</select>
Attributes
4: indicates if the attribute is defined in HTML 4.01
5: indicates if the attribute is defined in HTML 5