:checked
W3C CSS Snapshot 2026
Match a selected checkbox, radio button, or option.
On this page
Syntax and values
| Value or syntax | What it does |
|---|---|
input:checked + label | Styles the label immediately after a checked input. |
Try the example
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>:checked</title>
<style>
input:checked + label { color: teal; font-weight: bold; }
</style>
</head>
<body>
<input id="updates" type="checkbox"><label for="updates">Send updates</label>
</body>
</html>
What to expect Check the box to turn the label teal and bold.