Radio button
![](http://upload.wikimedia.org/wikipedia/commons/c/cb/Radio_button.png)
A radio button or option button is a graphical control element that allows the user to choose only one of a predefined set of mutually exclusive options. The singular property of a radio button makes it distinct from a checkbox, which allows more than one (or no) item to be selected and for the unselected state to be restored.
Radio buttons are arranged in groups of two or more and displayed on screen as, for example, a list of circular holes that can contain white space (for unselected) or a dot (for selected). Each radio button is normally accompanied by a label describing the choice that the radio button represents. The choices are mutually exclusive; when the user selects a radio button, any previously selected radio button in the same group becomes deselected (making it so only one can be selected). Selecting a radio button is done by clicking the mouse on the button, or the caption, or by using a keyboard shortcut.
It is possible that initially none of the radio buttons in a group are selected. This unselected state cannot be restored by interacting with the radio button widget, though it may be possible through other user interface elements. When used in an HTML form, if no button in a group is checked, then no name-value pair is passed when the form is submitted. For example, for a radio button group named Sex with the options Male and Female, the variable Sex would not be passed, even with a blank value.
Etymology
![](http://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/Car_Radio_of_Analog_Era.jpg/220px-Car_Radio_of_Analog_Era.jpg)
Radio buttons were named after the physical buttons used on older radios to select preset stations[1][2] – when one of the buttons was pressed, other buttons would pop out, leaving the pressed button the only button in the "pushed in" position.[citation needed]
HTML
In web forms, the HTML element <input type="radio">
is used to display a radio button. Example:
<form>
<input type="radio" name="season" value="winter" checked>Winter
<input type="radio" name="season" value="spring">Spring
<input type="radio" name="season" value="summer">Summer
<input type="radio" name="season" value="autumn">Autumn
</form>
Group of attributes defined by name. In one group can be chosen only one radio button.
Unicode
Version 6 of the Unicode standard includes a character designated to represent a radio button (🔘) at code point 128,280 (U+1F518), found in the Miscellaneous Symbols and Pictographs section. Similar characters are the circled dot operator (U+2299), fisheye (U+25C9), and bullseye (U+25CE).
The font Wingdings 2 contains at position 153 and 158 glyphs that look like radio buttons.
References
- ^ Jumašev, Alex. "The history of a radio-button". JitBit Founders Blog. Retrieved 14 September 2016.
- ^ "Radio Buttons". Windows Dev Center. Retrieved 14 September 2016.
External links
- A Simple Javascript Library for Styling Custom Radio Button
- W3Schools
- W3 HTML 4.01 Specification
- RFC1866
- Sun Java Programming Tutorial
- Radio Buttons - Microsoft Dev Center
- Nielsen, Jakob (September 27, 2004). "Checkboxes vs. Radio Buttons". Nielsen Norman Group (article). [Fremont, California]. Retrieved November 12, 2014.