How to disable the drop-down list in HTML5 ?
The drop-down is used to create a list of items that need to select an element. We use <select> and <option> elements to create a drop-down list and use disabled attribute in <select> element to disable the drop-down list element. A disabled drop-down list is un-clickable and unusable. It is a boolean attribute.
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.
<select disabled> Option values... </select>
- disabled: The <select> disabled attribute is used to specify the select element is disabled. A disabled drop-down list is un-clickable and unusable. It is a boolean attribute.