• Have Any Question?
  • contact@eitworld.com

HTML radiobutton controls

  • Radio buttons allow choosing only one option from several available options.
  • Names of all the radio buttons of same group must be same.
  • They are also created using HTML tag but type attribute is set to radio.


<input type= “radio” name= “any name” value= “any value” />


Here is an example of radiobutton control which will show three radiobuttons with names undergraduate,graduate and post graduate respectively:


<!DOCTYPE html>
<form >
<input type= “radio” name= “qualification” value= “ugr” checked /> Undergraduate<br />
<input type= “radio” name= “qualification” value= “gr” /> Graduate<br />
<input type= “radio” name= “qualification” value= “pgr” /> Post Graduate

To see live output : Visit Try Yourself Editor



Here is the list of Attributes for creating radiobutton control:

Attribute Description
type (Required) It defines which input field to create.for radiobutton input control it will be set to radio.
name (Optional) It is important as the field will be identified in the other file or server by the value of this attribute.
value (Optional) The value that will be used if the radiobox is selected.
disabled (Optional) It specifies that the input field will be disabled. Generally, it is used alone without any value.
checked (Optional) It will specify that these will be shown checked initially. Generally, it is used alone without any value.


Real Time Web Analytics