Radio buttons form problem

The only problem I’m facing is that the radio buttons should be in a form tag but every time I attempt to do this I get an error.

  **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>
</form>
<label>
<input id="indoor" type="radio" name="indoor-outdoor">Indoor
</label>
<label>
<input id="indoor" <form type="radio" name="indoor-outdoor">Outdoor
</label>
</main>
  **Your browser information:**

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

Challenge: Create a Set of Radio Buttons

Link to the challenge:

Hi @eliasaden7 !

A couple of issues.

No.1
Your radio buttons are not in the form.
The form ends here

You placed the radio buttons after the form ends.

No.2:
You have a syntax error here

You need to get rid of that <form in there because it doesn’t belong there.

Once you fix those errors than the test will pass.

1 Like

I’m sorry where do I place the button type submit form
this was not taught to me in the instructions

you can place the radio buttons just before the submit button.

  <form action="https://www.freecatphotoapp.com/submit-cat-photo">
    <input type="text" placeholder="cat photo URL" required>


RADIO BUTTONS GO HERE

    <button type="submit">Submit</button>
  </form>

Also, I noticed you were trying to post come code in your last reply but was unsure how and edited your response.

here is how to write code in the forum.

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 (’).

1 Like

I think there has been a misunderstanding I am looking for the solution for the "create a set of radio buttons problem.
sorry for the confusion

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

Yes, I understand your problem.

You are failing the test because your radio buttons are not in the form and you have a syntax error here

Make sense?

1 Like

no
I fixed the error and I’m still failing

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

Can I see your full code?

By this code snippet I can’t tell if they are in the form or not.

1 Like

nvm I figured it out
I had to place the labels in the form
thank you

1 Like

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