HTML and HTML5: Create a Set of Radio Buttons

Tell us what’s happening:
Each of my label element should have a closing tag, and I can’t seems to get it straight, any help?

Thanks

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

    
    <input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
  </label>
  </form>

</main>

Your browser information:

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

Challenge: Create a Set of Radio Buttons

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

<label>tag should wrap the input and it’s label like the example they gave you


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

i hope this helps

Thanks @amin. This resolved the issue quickly. :+1:

1 Like