Creates a radio button control.
The radio button allows the user to choose one of a predefined set of options. You can define groups with the name attribute of the radio buttons.
- Radio buttons with the same name belong to the same group.
- Radio buttons with different names belong to different groups.
- At most one radio button can be checked in a group.
Using many items in the same radio group results in an incomprehensible user interface. Use the selection list element in that case. This control is one of the form controls.
The state of the control can be submitted to a server if the following conditions are met:
- A form element must contain the radio button element.
- The action attribute of the container form must be set to the URL of the server.
- The name attribute of the radio button must be specified and non-empty.
If you want to see the HTML tags by categories, please visit this page.
This element cannot have a closing tag.
Example HTML code 1:
This example illustrates the use of the radio button element:
Did you find this example helpful?
User Contributed Comments