Im struggling to understand how to create 2 radio buttons in my form

Tell us what’s happening:
this is my first day coding. no experience prior. im on the html first section. and its asking me to add a pair of radio buttons to my form, each nested in a label of their own. im very confused how to do this part. where in the form do i write it i already have an image in there and a submit button

  **Your code so far**

<p>Click here to view more <a href="#">cat photos</a>.</p>

<a href="#"><img src="" alt="A cute orange cat lying on its back."></a>

<p>Things cats love:</p>
  <li>cat nip</li>
  <li>laser pointers</li>
<p>Top 3 things cats hate:</p>
  <li>flea treatment</li>
  <li>other cats</li>
<form action="">
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36

Challenge: Create a Set of Radio Buttons

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more information you give us, the more likely we are to be able to help.

Do you have some code you have tried? Can you say where you got stuck?

tried to explain. this is my first day coding never tried it before today. its a little confusing

So, your radio buttons need to go in here.

Let’s look at the example

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

You need to make two radio buttons that look like this, but with the required id values and label text.

after the input button?

I think either before or after should work.

Just read through the description thingy slowly and you’ll understand

Add a pair of radio buttons to your form, each nested in its own label element.

This implies, in this instance, that it will be placed within the <form> </form> tags.

Anywhere where the green line is, will work.

Screenshot 2022-04-10 4.47.05 AM

Sometimes, The best way to figure out the proper placement , is to put it in a number of different places, and if it isn’t working, push the RESET BUTTON and try another place.

Experimenting is a large part of coding. Try to become comfortable with putting things in the wrong places.

That being said, always feel free to ask for help, or seek help in outside tutorials if you can’t seem to figure it out.

Some people advise, as you are learning to code that it’s good to set a time limit on how long you spend working on a problem set, before you ask for assistance.

While this is generally good starting advice, Remember that freeCodeCamp Forums may be used by people aged 13- 119+… All over the world, with varying levels of American -English Proficiency, who may have difficulties in any of the following areas:

Oral / Written Language Disorder and Specific Reading Comprehension Deficit

These are all Neurological differences, that may make coding, reading and comprehending, especially without extra visuals, very Difficult…

It is best to try to offer a multi media approach, when someone is experiencing difficulties consistently …

For people who experience these difficulties, Hearing:

“Just read through the description thingy slowly and you’ll understand”, may be both unhelpful, and un-useful, because they may have already “read it Slowly” Ten Times, and still are having Difficulties.

1 Like

Yeah true, I will try to be more helpful

No, it was a perfectly helpful statement. And a good beginning… It’s always good to remember though, that what is easy for one person, may be a Struggle for others…

You did nothing wrong, In fact you did the right thing. I just wrote this as a general reminder.

This is an amazing response… I wish more people were like this.

chill, dont get me wrong no disrespect


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