Definition
A radio button is a small circular element within a graphical user interface that allows the user to select one option from a predefined set of options. It gets its name from the similarity to the preset buttons on an old car radio: pressing one button deselects the previously selected button. Radio buttons are primarily used for mutually exclusive selections, meaning only one option can be selected at a time.
Examples
- Print Dialog: In a print dialog box, radio buttons might allow the user to choose between printing the entire document, selected pages, or just the current page.
- Survey Forms: Radio buttons are commonly used in survey forms where respondents can select one answer to each question.
- Settings Menus: In software settings, radio buttons might be used to choose between different display modes, such as ‘Light Mode’ or ‘Dark Mode’.
Frequently Asked Questions
What is the difference between a radio button and a checkbox?
A radio button is designed for selecting one option from a set of options (mutually exclusive), while a checkbox allows for selecting multiple options independently.
Can a radio button be unselected?
Typically, once a radio button is selected, it can’t be deselected on its own. It can only be deselected by selecting another radio button in the same group.
Why are radio buttons used in forms?
Radio buttons are used in forms to provide users with a clear and intuitive method of selecting one option from a list of mutually exclusive choices.
How do radio buttons work in programming?
In HTML, radio buttons are created using the “input” tag with the type attribute set to “radio.” They must share a common “name” attribute to be grouped together.
Are radio buttons accessible?
Yes, radio buttons can be accessible if implemented correctly. Proper labels and ARIA attributes should be used to ensure screen reader compatibility.
Related Terms
Checkbox
A checkbox is a square box that can be either checked or unchecked to select or deselect one or multiple options in a form.
Dropdown Menu
A dropdown menu allows users to select one option from a list by clicking on a box, which expands to show the complete list of available choices.
Dialog Box
A dialog box is a small window that prompts the user to make decisions or enter information before they can proceed.
Online Resources
Suggested Books
- Don’t Make Me Think by Steve Krug - A guide on web usability, including user interface elements like radio buttons.
- Forms that Work by Caroline Jarrett and Gerry Gaffney - Focuses on creating efficient and user-friendly forms.
- The Design of Everyday Things by Don Norman - Explains the principles of user-centered design.
Fundamentals of Radio Button: Computers and the Internet Basics Quiz
Thank you for learning about radio buttons. Use your new knowledge to create intuitive and user-friendly interfaces!