How i can create a "radio"

Tell us what’s happening:
How i can create a radio? i don’t understand nothing :c
Your code so far


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

<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>

<p>Things cats love:</p>
<ul>
  <li>cat nip</li>
  <li>laser pointers</li>
  <li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
  <li>flea treatment</li>
  <li>thunder</li>
  <li>other cats</li>
</ol>
<form action="https://freecatphotoapp.com/submit-cat-photo">
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>
</main>
  **Your browser information:**

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

Challenge: Crea un conjunto de botones de radio

Link to the challenge:

I suggest reading the challenge instructions again carefully. There is example code.

<label> 
 <input type="radio" name="indoor-outdoor">Indoor 
</label>
2 Likes

if i understood the instructions i wouldn’t have posted this :confused:

What part of the instructions are confusing? I’d be happy to go into more details about any of it if you can tell us what doesn’t make sense?

You are being rude dude, we all get stuck keep your chin up don’t let the code ruin your mood. :smiley:

sorry… i guess, i got carried away?

basically, how do I create a “radio”?
what is the “for” attribute?
and how do I get the id of a “radio”?

@ArielLeslie gave you the example, the way to create a radio is by specifying ‘radio’ on the ‘type’ attribute

from my knowledge ‘for’ goes together with a label of that same name e.g ‘for=name’ should be in a tag for a list called name or in your case for the radio button.

Don’t panic too much try to see the answer in the instruction, if it is too hard, there is always a hint you can use.

1 Like

How to create a radio input is explained with the code example.

The for attribute is an attribute on the label that helps with accessiblility for people who use assistive technologies.

You don’t need to get the id. You create it. If you look at the second code example in the description it has code that includes both for and id attributes.

Please do not post full solutions. Instead, please help users repair their own code.

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