HTML.form.guide

How to Create a “Yes/No” Radio Button

radio button

Using radio button to accept Yes/No questions is best because the field accepts only one of the options. It is better than a dropdown because there are only two choices - either of them can be selected by a single click

Here is the code to create a yes/no radio button.

<input type=”radio” 
       nameaffirmative
       value=”yes”
       checked>
            Yes
</input>

<input type=”radio”
       namenegative
       value=”no”>
            No
</input>

Demo

Also see: HTML Form input examples