The HTMLOptionsCollection interface represents a collection of <option> HTML elements (in document order) and offers methods and properties for selecting from the list as well as optionally altering its items. This object is returned only by the options property of select.


Name Type Description
length unsigned long As optionally allowed by the spec, this property isn't read-only. You can either remove options from the end by lowering the value, or add blank options at the end by raising the value. Mozilla allows this, while other implementations could potentially throw a DOMException.


This interface inherits the methods of its parent, HTMLCollection.


HTML Standard (HTML)
# the-htmloptionscollection-interface

Browser compatibility

BCD tables only load in the browser

See also