Can Anyone plese solve me this code ...?

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>
<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 browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0.

Challenge: Create a Set of Radio Buttons

Link to the challenge:

1 Like

“form action=”/submit-cat-photo""

in the above line you need to remove the / before submit.

Nope…Its Doesnot…

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>

This was my code…The Error is showing like
// running tests
Each of your two radio button elements should be nested in its own

label

element.
// tests completed

flip the order of your lines for input and label

so that you have label line first then input line

Each of your input elements should be inside (between opening and closing tags) its own label element. “Indoor input” element inside “indoor label” element and “outdoor input” element inside “outdoor label” element

Tried but its showing like… Each of your two radio button elements should be nested in its own

label

element.

Please post here the code that you tried.

<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>
<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>

Your input elements are outside your label elements.

First you should have start tag of a label element, then an input element, then content, then end tag of a label element.

download

@skanth987 your input should be nested inside each designated label tags :slightly_smiling_face:

1 Like

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.

Oh. I understand. Thank you for correcting me :slightly_smiling_face:

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.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.

markdown_Forums

1 Like

you have to do like this:-

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

    
 <label for="outdoor">Outdoor
    <input id="outdoor" type="radio" name="indoor-outdoor"></label>

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.