Learning HTML by Building a Cat Photo: Step 50

What am I missing here? It keep saying " Both radio buttons should still be located between opening and closing label element tags."

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

I’ve edited your code 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

Can you provide a link to the challenge

This is not a valid html element

Sure thing… I appreciate your help!

So the directions say

Nest the Indoor and Outdoor radio buttons within a fieldset element, and don’t forget to indent the radio buttons.

There are two things with this.

  1. You need to change fieldsetName to fieldset because fieldsetName is not a valid html elment

  2. It just mentions one fieldset, and you have two. So both indoor and outdoor need to be inside one single fieldset

Also because you are nesting the two inside the fieldset, the fieldset comes before the label not after

1 Like

What am I missing here? It keep saying " Both radio buttons should still be located between opening and closing label element tags."

Also does the fieldset have an opening and a closing?

Ok so I tried it several different ways:

1.)

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

2.)

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

I think I am still missing something…

Your fieldset are still coming after the label not before

2 Likes

Thank you… I saw the errors of my ways! :upside_down_face: It only took me 12 years… :joy: :joy:

2 Likes

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