Create a Set of Radio Buttons help needed asap

Tell us what’s happening: Can someone please help. I really do not know what I am doing wrong?

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="/submit-cat-photo">
<label>
     <input id="indoor" type="radio" name="indoor-outdoor">
     <label for="indoor">Indoor</label>
     <input id="outdoor" type="radio" name="indoor-outdoor">
     <label for"outdoor">Outdoor</label>
 </label>

  </form>
</main>

Thank you for the reply, What I am being asked is that both my two radio button elements should be nested in its own label element. I am very new to this sorry

And what is your problem in the sentence:

both two radio button elements should be nested in its own label element

?

// running tests

Each of your two radio button elements should be nested in its own label element.

// tests completed

Don’t feel sorry man Everybody here is to learn and help each other

2 Likes

Thank you. I have been stuck on this for a few hours i really need help. Do you know what I am doing wrong?

wait i will send you a solution

here complete code

&lt;h2&gt;CatPhotoApp&lt;/h2&gt;

&lt;main&gt;

&lt;p&gt;Click here to view more &lt;a href="#"&gt;cat photos&lt;/a&gt;.&lt;/p&gt;

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

&lt;p&gt;Things cats love:&lt;/p&gt;

&lt;ul&gt;

&lt;li&gt;cat nip&lt;/li&gt;

&lt;li&gt;laser pointers&lt;/li&gt;

&lt;li&gt;lasagna&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Top 3 things cats hate:&lt;/p&gt;

&lt;ol&gt;

&lt;li&gt;flea treatment&lt;/li&gt;

&lt;li&gt;thunder&lt;/li&gt;

&lt;li&gt;other cats&lt;/li&gt;

&lt;/ol&gt;

&lt;form action="/submit-cat-photo"&gt;

&lt;input type="text" placeholder="cat photo URL" required&gt;

&lt;button type="submit"&gt;Submit&lt;/button&gt;

&lt;label&gt;

&lt;input type="radio" name="indoor-outdoor"&gt;Indoor

&lt;/label&gt;

&lt;label&gt;

&lt;input type="radio" name="indoor-outdoor"&gt;outdoor

&lt;/label&gt;

&lt;/form&gt;

&lt;/main&gt;

in button you need to add two label just after the button
like <label>

<input type=“radio” name=“indoor-outdoor”>Indoor

</label>

<label>

<input type=“radio” name=“indoor-outdoor”>outdoor

</label>

You have nested everything in a label tag, but you shouldn’t do that, instead you should have an input tag inside it’s own label tag, and the other input tag inside its own label tag
Just as the test say, you need to nest each input tag inside its own label tag

Hey, don’t you think it is easier to learn for someone if they can arrive to the solution on their own? Personally I find hints or pointing out what’s wrong far more useful than just finding the answer to copy and paste

3 Likes

Okay man i will the same as you said
Thanks for correcting me

1 Like