Cannot pass challenge 49 with <fieldset> element, HELP

Hello,

I am stuck at challenge 49 of the first section of the New Responsive Web Design Certification

To solve this challenge it is asked to:
“Nest the Indoor and Outdoor radio buttons within a fieldset element, and don’t forget to indent the radio buttons.”

This is the code to work on:

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

I put fieldset opening and closing tags before and after the first opening and the last closing tag for

indenting of how many spaces? sometimes I solved some challenges by adding or removing some space

I keep getting that the code is incorrect. How to solve this challenge?

1 Like

When you paste code make sure you use three backticks before and after the code block so that the code can be seen. It would be good if you post the challenge link too.

Without seeing your code I cannot say for certain what the problem is. However, indentation is 2 spaces for each indentation level. So, the fieldset would be opened before your first radio button and closed after your last radio button while indenting both label elements 2 spaces from the start of the fieldset element.

1 Like

I noticed the code I put was not visible anyway now I wrapped it with 3 backticks
here is the code that is given to work on:

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

here is the URL of the step 49:
https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-html-by-building-a-cat-photo-app/step-49

I can see the output label and its input, but not that of the input (I’m guessing you forgot about it).
The lesson requires you to nest the indoor and outdoor radio’s into a fieldset.

I would click the Restart Step button and just as you wrapped the code with the backticks do the same with the fields elements.

Note: You can press the enter key after the fieldset element and indent the code if you want(I suggest like that as it’s said in the instructions).

1 Like

I think it is visible now

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

Click the Restart Step button and just as you wrapped the code with the backticks do the same with the fields elements.

Note: You can press the enter key after the fieldset element and indent the code if you want(I suggest like that as it’s said in the instructions).

I fixed the problem by looking at step 50 :smiley:

It’s good to hear that you solved the problem, but next time solve the challenges by looking at the instructions and if you can’t solve it, get help someone will respond. Looking at the next step and solving will not help in your development.

yes I need to get to the solution without “cheating”

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

1 Like

will do thanks :ok_woman:

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