Need advice on Step 51 of Cat photo app

Here is my code:

       <fieldset>
            <fieldset>
            <legend>Is your cat an indoor or outdoor cat?</legend>
            <label><input id="indoor" type="radio" name="indoor-outdoor" value="indoor"> Indoor</label>
            <label><input id="outdoor" type="radio" name="indoor-outdoor" value="outdoor"> Outdoor</label>
          </fieldset>
          <input type="text" name="catphotourl" placeholder="cat photo URL" required>
          <button type="submit">Submit</button>

link to the challenge: Learn HTML by Building a Cat Photo App: Step 51 | freeCodeCamp.org

I’ve set my fieldset element. I put the opening tag fieldset directly below the 1st fieldset. I got that incorrect. Any advice here?

1 Like

You’ve written two <fieldset> opening tags in your code, but only only one closing tag.

I’m seeing two opening fieldset tags but only one closing tag.

I tried removing the top fieldset tag, but no luck unfortunately.
I was thinking I needed to nest the 2nd fieldset below the first one. The removal of the 1st one doesn’t work unfortunately.

I removed the 1st fieldset, but no luck.

You need two fieldset elements, each with an opening and closing tag.

1 Like

They should not be nested. Try putting the new opening and closing <field> tags right after the original </field> closing tag.

5 Likes

Thank you so much! your advice helped me greatly, I originally thought the opening fieldset element just counted as one fieldset. Then, I looked again after you told me your advice, and figured out that the original opening and closing fieldset count as 1 fieldset haha. Thank you so much for your advice it helped a lot. :slightly_smiling_face:

2 Likes

Thank you, I really appreciate it. Have fun coding, Edlun!

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