Radio buttons are the one form field type where you need to have more than one in order for them to be usable at all. This means that they require slightly different coding from all of the other fields in your form. To start with, all of the actual radio buttons need to have the same name attribute in order to define them as a group in the first place. Another important part of the way the radio buttons need to be coded (this time shared with check boxes) is that it is essential that they have the label properly attached so that clicking on the label has the same effect as clicking on the button itself. Also important is to provide a visual indication that the buttons are grouped - particularly if you have more than one group of radio buttons on the form.
There are two ways of attaching a label to each button. One way is to give each button its own unique id and then use the for attribute on the label to attach it to the button.
<input type="radio" name="myradio" id="myradio1"><label for="myradio1"> my label</label>
The alternative is to enclose the button inside of the label.
<label><input type="radio" name="myradio" > my label</label>
As for visually identifying the group so that people filling out the form can tell what radio buttons belong to which group. The simplest way to do this is to wrap the radio button group inside a fieldset which is the form field element specifically intended for identifying a group of form fields. The default representation of a fieldset is to place a border around the group but you can style this with CSS to visually separate the group in whatever way you like. Once you have a fieldset, you can then use the legend tag to specify what the group is for. This provides the best way to ask the question that selecting a radio button is supposed to answer in a way that makes it clear what answers belong to which question.
This article written by Stephen Chapman, Felgall Pty Ltd.