In this video, I will explain to you how to create a radio button in HTML. This video will clear your all doubts about the radio button form in HTML.
- The [input type=”radio”] defines a radio button.
- Radio buttons are normally presented in radio groups (a collection of radio buttons describing a set of related options). Only one radio button in a group can be selected at the same time.
Note: The radio group must have shared the same name (the value of the name attribute) to be treated as a group. Once the radio group is created, selecting any radio button in that group automatically deselects any other selected radio button in the same group. You can have as many radio groups on a page as you want, as long as each group has its own name.
Note: The value attribute defines the unique value associated with each radio button. The value is not shown to the user but is the value that is sent to the server on “submit” to identify which radio button was selected.