HTML <select> required Attribute

❮ HTML <select> tag


<label for="lang">Choose your option:</label>

<select name="language" id="lang" required>
  <option value="">None</option>
  <option value="HTML">HTML</option>
  <option value="CSS">CSS</option>
  <option value="JavaScript">JavaScript</option>


The required attribute specifies the user will be required to select a value before submitting the form.

Standard Syntax

<select required>

Browser Support


Attribute Values

Value Description
required This is a boolean attribute, the presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.
❮ HTML <select> tag