Can anyone please tell me why is my code not passing and type the correct code so I can learn from it?

Tell us what’s happening:
Describe your issue in detail here.

 **Your code so far**
<label for="indoor">
<input id="indoor" type="radio" name="indoor-outdoor">Indoor 
</label>
 <label for="outdoor">
    <input id="outdoor" type="radio" name="indoor-outdoor">Outdoor 
    </label>
 **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36

Challenge: Step 47

Link to the challenge:

HI @mohamad.khater498 !

It looks like when you changed the spacing it confused the tests and that is why it is not passing.

When I reset the lesson and only added the name attribute to the inputs it passes for me.

Make sure to only add to the inputs and touch nothing else and you should be fine.

Hope that helps!

I just did what you said and it still gives me the same “error message”. Below is my new code. Not sure what the problem is :confused:

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

Delete an angle brackets after type=“radio”.

That’s the correct code:

Mod Edit : SOLUTION REDACTED

Hey Rustyrazor, I did that too and did not work. Still not sure what the problem is.

Please post your latest code of you removing the extra >

here is it,

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

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.

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

You still have syntax errors.

We only wanted you to remove the extra > from the input in your earlier code.
But it looks like you misunderstood and removed all closing > from the inputs

This is incorrect

I would suggest resetting the lesson and making sure to only add the name="indoor-outdoor" to the inputs.

Be careful not to add anything else or remove anything else.

Once you do that then the test will pass.

Hope that helps!

Hi Jessica, honestly thank you so much for taking the time and try to help me with this, I genuinely appreciate it!
I am sorry but I am still not getting it. here is the last thing I did and please let me know what I did wrong.
I removed the angle bracket after the type attribute and included the name attribute as well. so I’m not sure what I missed again.

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

You need to add an angle bracket after all attributes, after the name attribute in this case. Like <input attribute="value">

1 Like

When you add the name="indoor-outdoor" you keep removing the > from the end of the input.

Make sure you don’t remove anything or else you will get errors.

You can also look at the MDN docs for the correct syntax for inputs if that helps

1 Like

Rustyrazor and Jessica thanks a lot for your continues help with responding honestly!!
okay, here is the last thing I did.

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

Please let me know why it is wrong?