Basic HTML and HTML5 problem

Hello!Im in lesson 21, " Create a Set of Radio Buttons"and im stuck.I wrote the code and it was exactly as it was shown on the video in "Get Help"option.But,while i typed the right code its still appearing me that " Each of your two radio button elements should be nested in its own label element."What should i do to pass the test?Here is my code

<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>

I can’t see any code except the words ‘Indoor Outdoor’. You’ll need to add a little more.


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.

Please 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.


It looks like you did not nest your radio buttons inside of a label like the challenge requires.

<parent tag>
  <nested tag>
</parent tag>

yeah,i dont know why but it is not appering everything i wrote.

yes i did but it is not appering in my post.I dont know why.

i did it,forget about the code.It is not appering in my post for some reason.

I edited your post so that the code is visible.

In your post, the code you provided does not have the radio buttons nested inside of the labels. You have the labels below the radio buttons.

yes i saw your answer some minutes ago.Thank you for the information it was my first forum post.

1 Like