The radio button is very similar to the checkbox. It uses the same syntax and attributes.
- The value of the type attribute is "radio"
- The user can select only one radio button in a group at a time(radio button are grouped according to the name attribute)
- The browser renders them in the radio button style.
Note
If none of the radio button in a group is selected, then no data is sent from the group.
If an element in a group of radio elements is selected and this element has a value attribute, data is submitted using the syntax: "radio_button_name=radio_button_value"
If an element in a group of radio elements is selected and this element doesn't have a value attribute, data is submitted using the syntax "radio_button_name=on". It is recommended that you avoid this scenario.