Creating checkbox

Tell us what’s happening:
Describe your issue in detail here. Hi i need help on creating checkbox
it say “make sure each of your label elements has a closing tag” i tried it many times such that i can’t spot my error.

  **Your code so far**

<p>Click here to view more <a href="#">cat photos</a>.</p>

<a href="#"><img src="" alt="A cute orange cat lying on its back."></a>

<p>Things cats love:</p>
  <li>cat nip</li>
  <li>laser pointers</li>
<p>Top 3 things cats hate:</p>
  <li>flea treatment</li>
  <li>other cats</li>
<form action="">
  <label for="indoor"><input id="indoor" type="radio" name="indoor-outdoor"> Indoor</label>
  <label for="outdoor"><input id="outdoor" type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label for="mean"><input id="mean" type="checkbox" name="personality">     mean</label>
<label for="loving"><input id="loving" type="checkbox" name="personality">loving</label>
<label for="caring"><input id="caring"  type="checkbox" name="personality"> caring</label>
<label for=""    
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36 Edg/94.0.992.38

Challenge: Create a Set of Checkboxes

Link to the challenge:

The error message is correct. Your code contains three label elements that are correctly closed and also this;
<label for=""

1 Like

OK, so if all three label elements are closed correctly and opened correctly what could be the cause of an error?

Read my response carefully. Look over your code carefully.
You have three label elements for the checkboxes and then you have another label that’s…well it’s just there. It’s not a correct element.

Once again, in its entirety it is
<label for=""

That is incorrect and needs to be deleted. Once you do that the tests will pass.

This was the cause of an error (label for=" ") as you mentioned. I couldn’t notice
at first.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.