fabzy31
February 19, 2021, 7:24pm
1
When I run my code, it gives me the error below:
// running tests
Each of your radio button elements should be added within the form tag.
// tests completed
Here’s my code:
<form action="https://freecatphotoapp.com/submit-cat-photo">
<p><label for="indoor">
<input id="indoor" type="radio" name="indoor-outdoor"> Indoor
</label>
<p><label for="outdoor">
<input id="outdoor" type="radio" name="indoor-outdoor"> Outdoor
</label>
</form>
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0.
Challenge: Create a Set of Radio Buttons
Link to the challenge:
You didn’t include your full code. The code you shared does not have a form tag. The radio buttons should be inside the form. You also have a random <p> in there.
fabzy31
February 19, 2021, 7:27pm
3
Thank you. I put the code within the form tag. But it gives the error always.
fabzy31
February 19, 2021, 7:29pm
5
Thanks Randel. I have copied and pasted the code you have given me. it still gives the same error.
fabzy31
February 19, 2021, 7:31pm
6
Yes I have opening p tags
fabzy31
February 19, 2021, 7:34pm
7
Thank you Ariel. I think the problem was the p tags. I have removed them. Now it works.
fabzy31
February 19, 2021, 7:40pm
8
Randel. I wanted the radio button to be one top of the other. But I realized that it caused the issue that I had. Thanks a lot. It works now.