Radiobuttons is the perfect choice of input field when you have some preset values that the user must choose between but you want to limit their option to just one answer. The structure is the same as with the checkboxes – all radiobuttons with the same name are one group and the user can only choose one radiobutton within a group. The value attribute defines the string that is being sent to your email, to the database or however you choose to use the input.
<input type="radio" name="your-group" value="unit-in-group" />Unit-in-group
Radiobuttons is a suitable choice when you want to present a lot of options to the user, but at the same time makes sure they choose just one.This example shows how you force the visitor to choose just one of their favourite pets:
<form method="post"> <fieldset> <legend>What is Your Favorite Pet?</legend> <input type="radio" name="animal" value="Cat" />Cats<br /> <input type="radio" name="animal" value="Dog" />Dogs<br /> <input type="radio" name="animal" value="Bird" />Birds<br /> <input type="submit" value="Submit now" /> </fieldset> </form>