Learn HTML by Building a Cat Photo App - Step 63

Tell us what’s happening:

Helo,
In my form, I have two radio buttons and three checkboxes well nested in their respective fieldset elements. However, when I submit the code, the console keeps printing the error below. Kindly suggest a fix.

“Make sure there still are two radio buttons and three checkboxes nested in their respective fieldset elements.”

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <section>
        <h2>Cat Photos</h2>
        <p>Everyone loves <a href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg">cute cats</a> online!</p>
        <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
        <a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
      </section>
      <section>
        <h2>Cat Lists</h2>
        <h3>Things cats love:</h3>
        <ul>
          <li>cat nip</li>
          <li>laser pointers</li>
          <li>lasagna</li>
        </ul>
        <figure>
          <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg" alt="A slice of lasagna on a plate.">
          <figcaption>Cats <em>love</em> lasagna.</figcaption>  
        </figure>
        <h3>Top 3 things cats hate:</h3>
        <ol>
          <li>flea treatment</li>
          <li>thunder</li>
          <li>other cats</li>
        </ol>
        <figure>
          <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/cats.jpg" alt="Five cats looking around a field.">
          <figcaption>Cats <strong>hate</strong> other cats.</figcaption>  
        </figure>
      </section>
      <section>
        <h2>Cat Form</h2>
        <form action="https://freecatphotoapp.com/submit-cat-photo">

<!-- User Editable Region -->

<fieldset>
    <legend>Is your cat an indoor or outdoor cat?</legend>
    <label><input id="indoor" type="radio" name="indoor-outdoor" value="indoor" checked> Indoor</label>
    <label><input id="outdoor" type="radio" name="indoor-outdoor" value="outdoor"> Outdoor</label>
</fieldset>
<fieldset>
    <legend>What are your cat's personalities?</legend>
    <label><input id="loving" type="checkbox" name="personality" value="loving" checked> Loving</label>
    <label><input id="energetic" type="checkbox" name="personality" value="energetic"> Energetic</label>
    <label><input id="calm" type="checkbox" name="personality" value="calm"> Calm</label>
</fieldset>

    <input type="text" name="catphotourl" placeholder="cat photo URL" required>

<!-- User Editable Region -->

          <button type="submit">Submit</button>
        </form>
      </section>
    </main>
  </body>
</html>

Your browser information:

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

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 63

I can’t see exactly what the problem is, but you may have changed some other code by accident.

Can you say exactly what you changed/added?

Try to reset the step and try it again

I haven’t changed anything. I have reset the code severally but its not working

Hey there!

I checked out your code, and everything looks mostly fine, but I noticed something that might be causing an issue. Your <input> elements are nested inside the <label> tags. While this is perfectly valid in HTML, sometimes it works better when the <input> comes first, followed by a <label> with a for attribute matching the input’s id.

For example:

<input checked type="radio" name="meal" value="breakfast" id="meal">
<label for="meal">Meal</label>

You might want to try this structure and see if it makes a difference.

Also, I noticed that your third checkbox is labeled “Calm,” but it was supposed to be “Lazy” based on the original instructions. Just a heads-up in case that needs fixing.

Hope this helps! Let me know if you have any questions. :blush:

1 Like

The checkbox labels in your code are not the same as the given code. RESET this step and add your checked attributes again.

1 Like

Many thanks it worked!