Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Highlight label for radio buttons when selected with only CSS
input:checked + label {
font-weight: bold;
<input id="radio-1" name="food" type="radio" value="broccoli">
<label for="radio-1">Broccoli</label>
<br />
<input id="radio-2" name="food" type="radio" value="burger">
<label for="radio-2">Burger</label>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.