How to validate HTML select tag without javascript

forms, html

Solution

Set `value=""` for the first option and the `required` validation will behave as expected:

<form>
  <select name="title" required>
    <option value="">Select One</option>
    <option value="1">First Value</option>
  </select>
  <button>submit</button>
</form>

Keep in mind browser support when leveraging HTML5 form validation.

Problem

Our select tags display an empty option tag at the beginning to ensure users don't automatically select the first option otherwise displayed: ``` <select name="title" required pattern="[A-Z]"> <option value="0"></option> <option value="Mr">Mr</option> <option value="Mrs">Mrs</option> <option value="Ms">Ms</option> </select> ``` How do we validate the select tag to ensure one of the options OTHER than 0 is selected? Perferably without Javascript!!

Original source