optgroup disabled vs option disabled
The disabled attribute
- when applied on optgroup element: disables an entire group of options
- when applied on option element: disables only that specific option
Video demonstration optgroup, option: disabled attribute
HTML5 optgroup, option: disabled attribute Tutorial
min | video details |
---|---|
00:00 | video tutorial: disabled attribute on optgroup element versus disabled attribute on option element |
00:05 | disable an option versus disable an entire group of options |
00:15 | a) disable an option if the disabled attribute is added on the option element → only that option will be disabled |
00:25 | 1 option is disabled GMT+4 |
00:30 | b) disable an entire group of options if the disabled attribute is added on optgroup element → the entire group + all its options will be disabled |
00:44 | all options under the first group + the group itself are disabled e.g. East of Greenwich GMT+1 ... GMT+14 |