ADDING A RADIO BUTTON IN HTML
ADDING A RADIO BUTTON IN HTML
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.
Comments
Post a Comment
If you have any doubts let me know in comments