0
0
HTMLmarkup~5 mins

Radio buttons and checkboxes in HTML - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the main difference between radio buttons and checkboxes in HTML?
Radio buttons allow the user to select only one option from a group, while checkboxes let the user select multiple options independently.
Click to reveal answer
beginner
How do you group radio buttons so only one can be selected at a time?
Give all radio buttons in the group the same name attribute value. This links them so only one can be selected.
Click to reveal answer
beginner
What attribute do you use to make a checkbox or radio button selected by default?
Use the checked attribute on the <input> element to make it selected when the page loads.
Click to reveal answer
beginner
Why should you use <label> elements with radio buttons and checkboxes?
Labels improve accessibility by making it easier to click the input and help screen readers understand the form controls.
Click to reveal answer
intermediate
How can you make a group of checkboxes or radio buttons accessible for keyboard users?
Use <label> tags linked with inputs, ensure logical tab order, and use <fieldset> with <legend> to group related controls.
Click to reveal answer
Which attribute groups radio buttons so only one can be selected?
Aname
Bid
Cvalue
Dchecked
What happens if you give checkboxes the same name attribute?
ACheckboxes behave like radio buttons
BOnly one checkbox can be selected
CCheckboxes become disabled
DMultiple checkboxes can be selected independently
Which HTML element improves accessibility by linking text to a checkbox or radio button?
A<div>
B<span>
C<label>
D<section>
How do you make a radio button selected by default?
AAdd the attribute active
BAdd the attribute checked
CAdd the attribute default
DAdd the attribute selected
Which input type allows multiple selections?
Acheckbox
Bradio
Ctext
Dbutton
Explain how to create a group of radio buttons where only one option can be selected. Include how to make one option selected by default.
Think about how browsers know which radio buttons belong together.
You got /4 concepts.
    Describe the accessibility best practices when using checkboxes and radio buttons in a form.
    Consider how people using keyboards or screen readers interact with forms.
    You got /4 concepts.