Checkboc understanding

Tell us what’s happening:

Your code so far


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

<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>

<p>Things cats love:</p>
<ul>
  <li>cat nip</li>
  <li>laser pointers</li>
  <li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
  <li>flea treatment</li>
  <li>thunder</li>
  <li>other cats</li>
</ol>
<form action="https://freecatphotoapp.com/submit-cat-photo">
  <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="loving"><input id="Personality" type="checkbox"name="Personality">Loving</label>
  <label for="Dashing"><input id="Personality" type="checkbox"name="Personality">Dashing</label>
  <label for="Lazzy"><input id="Personality" type="checkbox"name="Personality">Lazzy</label>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>
</main>

Your browser information:

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

Challenge: Create a Set of Checkboxes

Link to the challenge:

Please get in the habit of asking questions so we don’t have to dig to to find where the problem is.

But your problem is here:

  <label for="loving"><input id="Personality" type="checkbox"name="Personality">Loving</label>
  <label for="Dashing"><input id="Personality" type="checkbox"name="Personality">Dashing</label>
  <label for="Lazzy"><input id="Personality" type="checkbox"name="Personality">Lazzy</label>

The instructions said

All three should share the name attribute of personality .

You have given them the name attribute of “Personality”. HTML is case-sensitive, so “personality” is not the same as “Personality”.

When I fix that, the code passes.

Also, ids are supposed to be unique so those should not all have the same id. It doesn’t affect this test, but it is bad practice to have duplicates.

Dear kevinSmith,
Thanks for your support… I got it. I was writing the capital alphabet for “personality” instead of small.
you are right HTML is case sensitive.
Regards,
Aqib Ashraf

1 Like