How to use the “required” attribute with a “radio” input field

737    Asked by ankur_3579 in SQL Server , Asked on Jun 21, 2021

I am just wondering how to use the new HTML5 input attribute "required" the right way on radiobuttons. Does every radiobutton field need the attribute like below? Or is it sufficient if only one field gets it?

<input type="radio" name="color" value="black" required="required" />

<input type="radio" name="color" value="white" required="required" />

Answered by Angela Baker

Your Answer

Interviews

Parent Categories