Interactive online courses HTML Academy
2026-03-09 10:55 Diff

Now let’s work on improving the checkboxes. Let’s use the :checked ~ technique

First, let’s add checkboxes and labels to them in the markup, and then let’s hide the checkboxes.

Then let’s use the ::before pseudo-element for the labels to simulate checkboxes with the desired appearance: small squares with a dark border. The styles for the pseudo-elements have already been assigned in the code.