<title>HTML Input Type Checkbox Element Make Required</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
$(document).ready(function () {
$('button').click(function() {
checked = $("input[type=checkbox]:checked").length;
alert("Please select one checkbox to submit.");
Please Select Your Gender:<br><br>
<input type="checkbox" name="gender[]" id="male" placeholder="Male" required/>
<input type="checkbox" name="gender[]" id="female" placeholder="Female" required/>
<label>Female</label><br>
<input type="checkbox" name="gender[]" id="other" placeholder="Other" required/>
<label>Other</label><br><br>
<button type="button">Submit</button>