only displays Pepperoni , why do we need for attribute to connect and element? What happens if i forget to use for attribute.
there was an answer that if is wrapped within then for attribute is not needed. Still, that doesn’t explain the reason of connecting and . So I’m asking this question.
<label for="pepperoni">Pepperoni</label> <input id="pepperoni" name="topping" type="checkbox" value="pepperoni">