HTMLOptionElement
The interface for <option>. Extends HTMLElement → Element.
Reflected properties
All setters are guarded and throw NoModificationAllowedError on a read-only document.
| Property | Attribute | Type | Notes |
|---|---|---|---|
value |
value |
string | Reflects the content attribute (the browser's defaultValue) — not live editing state, since the server DOM is static. |
label |
label |
string | Reflects the content attribute verbatim. |
selected |
selected |
boolean (presence) | Reading reflects whether the attribute is present; writing false removes it, any other value sets it present. |
disabled |
disabled |
boolean (presence) | Reading reflects whether the attribute is present; writing false removes it, any other value sets it present. |
See also
- Element —
getAttribute/setAttribute, content,classList, traversal, insertion - HTMLElement — the global reflected properties every HTML element inherits
- JavaScript DOM API — the interface hierarchy and
instanceof