![]() |
VOOZH | about |
We will use <optgroup> and <option> tags to create an option-group list and use the disabled attribute with <optgroup> to create a disabled option-group list. The <optgroup> tag is used to create a group of the same category options in a drop-down list. The <optgroup> tag is required when there is a long list of items that exist. The <option> tag in HTML is used to choose an option from a drop-down menu.
Syntax:
<optgroup label=""> <option label=""> </option> </optgroup>
Example: In this example, we are using the above-explained method.
Output: