Radio Buttons CODING ISSUE

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 for="indoor"> <input id="indoor" typw="radio" name="indoor-outdoor"> indoor <form action="/submit-cat-photo"> </label>
    <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 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.

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

Why is you form element in such a weird place?

Its the system arrangement

Can you be kind enough to explain the code?

All your inputs should be under the form element.

You have a typo, it should be type not typw, and you have place the <input type="radio"> along with its label above the <button></button>

And the <input> elements should be inside the <form></form>

1 Like

Thank you so much, I really appreciate this.