The mutually exclusive radio buttons in their native format
The radio class is a simple wrapper around the
<input type="radio"> HTML elements. It is intentionally
not styled, to preserve cross-browser compatibility and the user experience.
Make sure the linked radio buttons have the same value for
their name HTML attribute.
<divclass="control"><labelclass="radio"><inputtype="radio"name="answer"/>
Yes
</label><labelclass="radio"><inputtype="radio"name="answer"/>
No
</label></div>
You can check a radio button by default by adding the
checked HTML attribute to the
<input> element.
<divclass="control"><labelclass="radio"><inputtype="radio"name="foobar"/>
Foo
</label><labelclass="radio"><inputtype="radio"name="foobar"checked/>
Bar
</label></div>
You can disable a radio button by adding the
disabled HTML attribute to both the
<label> and the <input>.
<divclass="control"><labelclass="radio"><inputtype="radio"name="rsvp"/>
Going
</label><labelclass="radio"><inputtype="radio"name="rsvp"/>
Not going
</label><labelclass="radio"disabled><inputtype="radio"name="rsvp"disabled/>
Maybe
</label></div>