Easy Tutorial
❮ Prop Frameset Cols Prop Style Borderleftwidth ❯

disabled Attribute


Example

Example 1

Disable the second option in the dropdown list:

Output result:


Definition and Usage

The disabled attribute sets or returns whether an <option> element is disabled by default.

A disabled input element is unusable and unclickable. The disabled attribute can be set until certain conditions are met (such as selecting a checkbox, etc.).

Syntax

Set the disabled attribute:

Return the disabled attribute:


Browser Support

All major browsers support the disabled attribute.

❮ Prop Frameset Cols Prop Style Borderleftwidth ❯