vendredi 5 novembre 2021

Why does my input id not connect to 'for' from the label to check the checkbox without html?

I want my checkbox to be able to be checked without using and JS. I think you do this by putting an ID to input and connecting it to the for in the label. This however does not work.

This is my HTML:

      <label for="burger" class="hamburgerMenu" href="#">&#8801;</label>
      <input type="checkbox" id="burger" />



Aucun commentaire:

Enregistrer un commentaire