HTML 5 · Forms

Add radio buttons and checkboxes

Radio buttons that share a name allow one choice.

<label><input type="radio" name="plan" value="free"> Free</label>
<label><input type="radio" name="plan" value="pro"> Pro</label>
<label><input type="checkbox" name="terms" required> I agree</label>

Official HTML 5 documentation

More forms commands

All forms commands · HTML 5 cheatsheet

Was this page helpful?