Create a Set of Radio Buttons problem

Create a Set of Radio Buttons problem
0

#1

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>
  <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> 
    <form action="/submit-cat-photo">
    <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/70.0.3538.77 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/create-a-set-of-radio-buttons


Create a Set of Radio Buttons i cant find a solution!
#2

Try to pay attention to each of the specific items with an X on the left side of the screen that is not letting you pass:

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

Make sure each of your label elements has a closing tag.

Each of your radio button elements should be added within the form tag.

You can make it work if you fix the above three problems


#3

how can i fix them? I don’t understand


#4

ok let’s start with the first issue

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

Nesting an element means that one element should placed inside another, making it a child of the parent element, the exercise gives you an example of what a nested element should look like

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

So, first nest the two radio elements inside their own separate label elements, and then we will go from there


#5

Very usefull, thanks a lot.