Having Trouble giving my radio buttons the name attribute of "indoor-outdoor"

Tell us what’s happening:
Describe your issue in detail here.

I am having trouble giving my radio buttons the name attribute of “indoor-outdoor”.

  **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://www.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="https://www.freecatphotoapp.com/submit-cat-photo">
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>

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

<label>
<input id="outdoor" type="radio" name=“indoor-outdoor”>Outdoor
</label>
</form>

  
</main>
  **Your browser information:**

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 13904.55.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.102 Safari/537.36

Challenge: Create a Set of Radio Buttons

Link to the challenge:

Hey,

From your code, and looking at the exercise, it looks like your labels are your problem. Re-read the section containing the code snippets showing you best practices for labels.

Your answers are there.

Now go crush it.

1 Like

Thank you very, I went back and found what my mistake was with my labels. :slight_smile:

<h2>CatPhotoApp</h2>
<main>
  <p>Click here to view more <a href="#">cat photos</a>.</p>

  <a href="#"><img src="https://www.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="https://www.freecatphotoapp.com/submit-cat-photo">
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>

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

    
</main>
1 Like

:clap:t5: No problem. Glad to see that you solved it!

@atkasuse, I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.