- A radio button, allows a single value to be selected out of multiple choices with the same name value
-
input
elements of typeradio
are generally used in radio groups—collections of radio buttons describing a set of related options - Only one radio button in a given group can be selected at the same time
- Radio buttons are typically rendered as small circles, which are filled or highlighted when selected
- A radio group is defined by giving each of radio buttons in the group the same name
- You can have as many radio groups on a page as you like, as long as each has its own unique name
-
checked
A Boolean attribute which, if present, indicates that this radio button is the default selected one in the group value
-
The value attribute is one which all
input
elements share - However, it serves a special purpose for inputs of type radio
- When a form is submitted, only radio buttons which are currently checked are submitted to the server, and the reported value is the value of the value attribute
-
If the value is not otherwise specified, it is the string
on
by default
-
The value attribute is one which all