Checkboxes and labels used to have to be right next to each other to be a potent UI duo. You could do trickery like this: <label for="toggle">Toggle</label> <input type="checkbox" id="toggle"> <div></div>Code language: HTML, XML (xml)#toggle:checked + div { /* Do something fancy in here with a toggleable on/off state */ }Code language: CSS (css)But now, thanks to :has() in CSS, we’re not beholden