CatPhotos: Basic HTML and HTML5: Create a Set of Radio Buttons

Hello!

I am new to the whole coding thing and I’m trying to complete the Cat Photo App challenge and it appears I’m stuck. I’m having trouble getting the radio buttons to work and I keep this message:
“Your radio buttons should be given the name attribute of indoor-outdoor.”

The thing is I’ve done everything correctly and this is the only thing thats giving me an issue! I’ve been stuck at this for hours now and any help would be appreciated! I pasted my code below from the particular lesson.

<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
<label> <input type="radio"name=“indoor-outdoor”>Indoor
</label>
<label> <input type="radio"name=“indoor-outdoor”>Outdoor

Hello and welcome to the FCC community~!

I’ve edited your post for readability. When you want to share blocks of code, place a line of three backticks (```) above and below the code to format it properly:
```
Your code here
```

Now, to take a look at your issue, it looks like your keyboard is using “smart quotes” instead of regular quotes ". This will cause errors in the code. :slight_smile:
Are you using a mobile device, by chance?

Hi!

No, I’m on a Dell Desktop. But is there a way to disable the smart quotes setting?

Huh. If you’re on a desktop, you shouldn’t be getting smart quotes in the FCC code editor (it’s usually an auto-correct in word processors, though). It’s possible that was just a parsing error by the forum platform.

The only other thing I see is that you don’t have a space before your name attribute - you should have a space between the attribute and the attribute before it.

<element attribute1="space after me" attribute2="no space after me">

Ah, I see. I’ll try that and see if that helps!

Hmm… still nothing. Unless I’m missing something. I added the spaces but I still get the error. Everything is correct though except that part. :slightly_frowning_face:

It also looks like you’re missing your last closing </label> tag. Is that in your full code?

I’m double checking that now. It’s prby most def a simple error that I keep missing.

Alright, so I added that but then it displays 2 incorrect in the code. This would be the full code I guess for this challenge. Every time I tweak something I get another incorrect. The name attribute is there but not sure what else is missing.

 <label> <input type="radio"name=“indoor-outdoor”>Indoor </label>
<label> <input type="radio"name=“indoor-outdoor”>Outdoor</label>
  </form>
</main>

It’s still showing that you have smart quotes, and no space before the name attribute… :slight_smile:

I feel like an idiot… :laughing:

I got it!

So this was the correct way:

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

1 Like

Nice work! I am glad you were able to get it to work.
I’ve wrapped your passing code in [spoiler] tags, to keep other campers from accidentally seeing it if they come across this post looking for a hint. :slight_smile:

1 Like