Advanced Forms
Fieldset Radio Group
A shipping choice uses fieldset, legend, shared radio names, and a checked default so related controls read as one group.
Program
fieldset and legend create a named group for controls that answer one question. Radio buttons join the group when they share the same name.
fieldset_radio_group.html
<fieldset>
<legend>Shipping speed</legend>
<label><input type="radio" name="speed" value="standard" checked> Standard</label>
<label><input type="radio" name="speed" value="express"> Express</label>
</fieldset>
fieldset
fieldset groups related form controls.
legend
legend names the grouped controls for people and assistive technology.
radio name
Radio inputs with the same name form one exclusive choice group.