Complete the code to create a radio button for selecting 'Male'.
<label><input type="[1]" name="gender" value="male"> Male</label>
The type attribute must be radio to create a radio button.
Complete the code to create a checkbox for subscribing to a newsletter.
<label><input type="checkbox" name="subscribe" [1]> Subscribe to newsletter</label>
The checked attribute makes the checkbox selected by default.
Fix the error in the code to group radio buttons correctly so only one can be selected.
<label><input type="radio" name="[1]" value="option1"> Option 1</label> <label><input type="radio" name="option2" value="option2"> Option 2</label>
name values to radio buttons that should be grouped.name attribute.Radio buttons must share the same name attribute to be grouped.
Fill both blanks to create a checkbox input with an accessible label and a unique id.
<input type="[1]" id="[2]" name="subscribe"> <label for="subscribe">Subscribe</label>
id and label's for attribute.radio instead of checkbox.The input type should be checkbox and the id must match the label's for attribute for accessibility.
Fill all three blanks to create a group of radio buttons with the same name and unique values.
<label><input type="radio" name="[1]" value="[2]"> Yes</label> <label><input type="radio" name="[1]" value="[3]"> No</label>
name attributes for each radio button.value for different options.Radio buttons in a group share the same name but have different value attributes.