option disabled attribute
The disabled attribute on the option element:
Examples
<option | attribute | = | "value(s)" | > | ... | <⁄option> | example |
---|---|---|---|---|---|---|---|
1. | disabled | = | "", , disabled | <disabled> ... <⁄ > <disabled=""> ... <⁄ > <disabled="disabled"> ... <⁄ > |
Video demonstration option disabled attribute
HTML5 option disabled attribute Tutorial
min | video details |
---|---|
00:00 | video tutorial: disabled attribute on option element |
00:05 | disabled attribute on option element disables the option (is an optional attribute) |
00:12 | let's disable the 1st option by adding the disabled attribute on it: 1. no value, attribute minimization 2. value empty string: "" 3. value- attribute's canonical name: "disabled" all 3 return true value → disable the option |
00:24 | the option is disabled; it can't be selected |