What is problem with the code?

Indoor<input type="radio"id=“outdoor”> outdoor

error shown is:
Your new radio button and associated label should be below the first one. You have them in the wrong order.

Can you link to the challenge?

Also, please properly format your code using `s

It’s hard for us to help unless we have more information.

Hi @zasajid1974 and welcome to the forum!!!
Follow the instruction:

Add a pair of radio buttons to your form, each nested in its own label element. One should have the option of indoor and the other should have the option of outdoor . Both should share the name attribute of indoor-outdoor to create a radio group.

Each radio button must have its own label:

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


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

This is the solution, but first try to get there on your own. :wave:

solution redacted by mod 
1 Like

link is here:

@HawksSpawn 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.

You can post solutions that invite discussion (like asking how the solution works, or asking about certain parts of the solution). But please don’t just post your solution for the sake of sharing it.
If you post a full passing solution to a challenge and have questions about it, please surround it with [spoiler] and [/spoiler] tags on the line above and below your solution code.

Without seeing all of your code it’s hard to tell but from the error message it seems that

  1. you started typing where the cursor was rather than moving it to after the radio button that is there
  2. you have an input that is not nested in a label

@Roma I’ve marked the code with the Blur Spoiler option, but, ok, sorry… I’ll keep that in mind for the next few times.

The blur spoiler is recommended when one has a question about their own code and are posting a solution. It is not meant as a way to provide others with solutions.

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