When I put a mark after the checkbox, this CSS selector works.
input[type=checkbox]:checked + label {
color: red;
}
<input type="checkbox"><label>Checkbox1</label>
But I want the checkbox to be checked when the label is clicked.

Here is the CSS for the updated HTML.
label > input[type=checkbox]:checked {
color: red;
}
<label><input type="checkbox">Checkbox1</label>
What can i do wrong here?
Here is simplified HTML and style in one file.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Selectors Test Ground</title>
<style>
label > input[type=checkbox]:checked {
color: red;
}
</style>
</head>
<body>
<form id="checkBoxForm">
<ul>
<li>
<label><input type="checkbox">Checkbox1</label>
</li>
<li>
<label><input type="checkbox">Checkbox2</label>
</li>
<li>
<label><input type="checkbox">Checkbox3</label>
</li>
</ul>
</form>
</body>
Sung source
share