Create A Set of Checkboxes issue - care to help?

I’m being prompted with the error, “Make sure each of your label elements has a closing tag.” to which I can clearly see they do. In fact, the first of the three checkboxes is copied from the lesson for posterity to troubleshoot this.

The code in question is the checkboxes for “loving, stupid, hungry”

Below is my code;

CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
Indoor Outdoor
Submit
<label for="loving"><input id="loving" type="checkbox" name="personality"> Loving</label>
<label for="stupid"><input id="stupid" type="checkbox" name="personality"> Stupid</label>
<label for="hungry"><input id="hungry" type="checkbox" name="personality"> Hungry</label>

Any immediately obvious issues?

edit: so I can already see for some reason the markup in the forum editor doesn’t recognize them at checkboxes which is weird. in my solution editor, the code functionally works. I have 3 checkboxes labeled appropriately that I can interact with. I’m confused.

Hi,
There are other label elements in the editor. You may face the same error If you make any changes to the closing tag of other label elements than these three.

Hope it helps.

I didn’t touch the code prior to entering my code.

Oddly, I cleared the problem with the reset code button and literally copy/pasted my written code back in, into the exact same spot I had it before and the solution worked this time. :face_with_symbols_over_mouth:

1 Like