<input type="radio" name="groupname" value="value1" checked>
Attribute | Description |
---|---|
Name | Specifies the group name of the radio button. One group of radio button will have same name through which it can be referenced. |
value | Value of the radio button. Each radio button will have different values in a group. |
Checked | Radio button will be selected. In a group of buttons one can be selected. |
Align | Specifies the alignment of the radio buttons. |
Gender: <input type="radio" name="grpGender" value="Male" Checked>Male
<input type="radio" name="grpGender" value="Female">Female
The above code places two radio buttons with a group name of "grpgender", one with a value "Male" and other one with value "Female". As the checked property is given for the first radio button it will be selected by default. This will give the output like :