HTML optgroup tag

HTML optgroup tag is used to show select options in groups inside the form elements.

The option tag is used inside optgroup for the grouping options.



List of HTML optgroup tag attributes

Sr. No.attribute optionsDescription
1labelThis attribute used to specify the label of options. The value of this can be any text.
2disabledThis attribute used to disable group all the options. This makes grouped options not selectable.The value for this is disabled.

Resources and References

1. W3C Specification.
2. HTML living standard
3. W3C project using Github

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.