HTMLSelectElement: required property
HTML DOM
HTML DOM
The **`required`** property of the HTMLSelectElement interface specifies that the user must select an option with a non-empty string value before submitting a form. It reflects the select element's [`required`](/docs/Web/HTML/Reference/Elements/select#required) attribute.
## Value
A boolean.
## Examples
```js
const selectElement = document.getElementById("fruits");
console.log(selectElement.required);
```
## Specifications
## Browser compatibility
## See also
- select
- HTMLSelectElement.validity
- :required pseudo-class
source: MDN Web Docs mirror · page
Cite this
"HTMLSelectElement: required property". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/required JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy