w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it

option disabled attribute

The disabled attribute on the option element:


1.disabled= "",  , disabled<option disabled> ... <⁄option>
<option disabled=""> ... <⁄option>
<option disabled="disabled"> ... <⁄option>

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
option intro option optional, occurrences option browser display option parents - children option(s) selected vs pre-selectedoption syntaxoption selected attribute