I’m having trouble with this:
input id="indoor"type="radio"name=“indoor-outdoor”>
<label for=“indoor”>Indoor</label>
Here is my code:
<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>
Welcome to the FCC forum @Johndg20
In the future, please show us your code wraped between a pair of three backsticks ```
```
<p>Your code here</p>
```
Now, the challenge says you must use the label tag to wrap each input element. So:
<label for='indoor'>Indoor
<input id='indoor type='radio' name='indoor-outdoor'>
</label>
You seem to be missing a < in the line i quoted above.
Could someone just give me the code for “Basic HTML and HTML5: Create a Set of Radio Buttons” so I can move on. I’ve been stuck on this for a day. Thanks
ghukahr
October 31, 2018, 11:28am
5
Please show us what you’ve tried already, we’ll be glad to put you in the right direction.
</ol>
<form action="/submit-cat-photo">
<input id="indoor"type=“radio” name=“indoor-outdoor”>
<label for=“indoor”>Indoor</label>
<label for=‘outdoor’>Outdoot
<input id='outdoor type=‘radio’ name=‘indoor-outdoor’>
</label>
I think I’m getting closer:
</ol>
<form action="/submit-cat-photo">
<label for “indoor”>
<input id="indoor"type=“radio” name=“indoor-outdoor”>Indoor
<label for=“outdoot”>Outdoor
<input id=“outdor” type=‘radio’ name=‘indoor-outdoor’>
</label>
Check your spelling. Make sure you close your tags. It looks like you might me missing at least one space.
I realize that I have posted this several times but I can’t get passed radio buttons.
Here is the code I have:
</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>
ghukahr
November 2, 2018, 12:39pm
10
I believe you need to put your input
's inside the label
, instead of above it.
I have already asked you to stop creating new topics for this same challenge. I have merged your topics. Do not create another one.
Read the instructions. It says “Add a pair of radio buttons to your form, each nested in its own label element.” Refer to the example given in the exercise if you are still unsure.
Marla
November 3, 2018, 2:08pm
13
I was stuck on this challenge for several days. The instructions are very confusing. I am new to coding, so I couldn’t find the problem with it, but it seems there is something not right about the example given in the video. Did anyone else have the same problem. Not complaining. I love Free Code Camp, just trying to figure out if it was just me… Thanks!
1 Like
@Marla @Johndg20 Here’s the example from FCC: <label for=“indoor”>
<input id=“indoor” type=“radio” name=“indoor-outdoor”>Indoor
</label>
^ This is exactly what you need to replicate for the challenge.
To create a nested radio button in its own label element is to create this:
<label><insert radio button code here>Label For Radio Button</label>
As you can see, the code for the radio button lies between the opening and closing label tags. That is what it means to create a nested element.
I hope this somewhat helps to clarify the instructions given. If there are any more questions, ask in this thread and I’ll try my best to assist!
1 Like
Hey John,
If you have not solved this question, use the examples that they have for us and just play around with it.
Good luck!