Tell us what’s happening:
Once again, not an issue. But a question. I need more explenation regarding attribut for on LABEL element, which is for=“”
thx for the team for their hardwork making this course and answering people question/problem.
Your code so far
<!-- User Editable Region -->
<input id="loving" type="checkbox" name="personality"> <label for="loving">Loving</label>
<input id="lazy" type="checkbox" name="personality"> <label for="lazy">Lazy</label>
<input id="energetic" type="checkbox" name="personality">
<label for="energetic">Energetic</label>
<!-- User Editable Region -->
I get it about, why every input element need same name value. but why for need the same as the id of input?
as far as i know, even you delete the FOR attribute. you still get the same output.
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Challenge Information:
Learn HTML by Building a Cat Photo App - Step 59