The HTML optgroup tag is used to group options within inside a <select> tag.
Attributes
Attribute | Description |
disabled | This boolean attribute is used to specify |
label | Used to specify a label for each groups. |
Example
<select id="lang">
<optgroup label="Compiled">
<option>C</option>
<option>C++</option>
<option>C#</option>
</optgroup>
<optgroup label="Interpreted">
<option>PHP</option>
<option>JavaScript</option>
</optgroup>
</select>