files/en-us/web/api/htmloptionelement/index.md
{{APIRef("HTML DOM")}}
The HTMLOptionElement interface represents {{HTMLElement("option")}} elements and inherits all properties and methods of the {{domxref("HTMLElement")}} interface.
{{InheritanceDiagram}}
HTMLOptionElement object. It has four parameters: the text to display, text, the value associated, value, the value of defaultSelected, and the value of selected. The last three parameters are optional.Inherits properties from its parent, {{domxref("HTMLElement")}}.
true or false that shows the initial value of the selected HTML attribute, indicating whether the option is selected by default or not.true or false representing the value of the disabled HTML attribute, which indicates that the option is unavailable to be selected.form of the corresponding {{HTMLElement("select")}} element, if the option is a descendant of a {{HTMLElement("select")}} element, or null if none is found.long representing the position of the option within the list of options it belongs to, in tree-order. If the option is not part of a list of options, like when it is part of the {{HTMLElement("datalist")}} element, the value is 0.label HTML attribute, which provides a label for the option. If this attribute isn't specifically set, reading it returns the element's {{domxref("HTMLOptionElement.text", "text")}} content.true or false that indicates whether the option is currently selected.value HTML attribute, if it exists; otherwise reflects value of the {{domxref("Node.textContent")}} property.Doesn't implement any specific method, but inherits methods from its parent, {{domxref("HTMLElement")}}.
{{Specifications}}
{{Compat}}