To apply the required attribute to a select field with HTML, we add the required
attribute.
For instance, we write
<select required>
<option value="">Please select</option>
<option value="one">One</option>
</select>
to add the select element with the required
attribute to make it a required field.