Certified HTML5 Developer Learning Resources Radio Button Control

Learning Resources
 

Radio Button Control


Radio Buttons are used when only one option is required to be selected. They are created using tag as shown below:

Here is example HTML code for a form with two radio button:

Maths Physics

The result of this code is the following form

Maths Physics

Following is the list of important radiobox attributes:

  • type: Indicates that you want to create a radiobox.

  • name: Name of the control.

  • value: Used to indicate the value that will be sent to the server if this option is selected.

  • checked: Indicates that this option should be selected by default when the page loads.

 For Support