Radio Buttons creation eror

Tell us what’s happening:

i set up radio buttons like below but when i test i have below eror why?

Give your radio buttons the name attribute of indoor-outdoor.

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

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">
  <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>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</main>

Your radio buttons are not inside of label elements.

Can you please write down how it should be !

Thank you so much !

Read the instructions again carefully. They include example code.

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

i have just checked the video solution and i do not have any missing part. What you wrote is totally different than the video solution and i did not understand

i have just received the eror below
Give your radio buttons the name attribute of indoor-outdoor .
and i dont think it is related with the label

The instructions explicitly say to nest the input elements inside the label elements

It is possible that the video has an error in that sense, they are made by volunteer contributors

1 Like

You have a space between the dash and the word outdoor on one of your name attribute values.

name="indoor- outdoor"

2 Likes

So can you please write down the code ?

So can you pls write down the code ?

Several people have put time and effort into helping you figure out how to solve the problems with your code. If you don’t want to keep working through it, then you can skip the challenge in the curriculum.

I am sorry but why are you offending ?

<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 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>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</main>

I think it should work, I just read what the guys above wrote and corrected your code.

I will not, if you follow the example and the various hints you will manage it

I am new in coding ! I honestly can say that I ‘be just started today and I am not trying to reach info easily ! I tried everway and I believe in that I have some part missing ! Anyway sorry about bothering

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

Thank you for understanding.

1 Like

It is great you are trying, but really, here we will help you even if you ask thousands of times the same thing because you don’t understand, but to let you learn from your mistakes we will not give you the answer that you can copy and paste

1 Like

I totally agree with you in general.

1 Like

Thank you very much !