Help with Labeling Radio Buttons in HTML

**Tell us what’s happening:**The website is telling me that I need to label my radio buttons. I cannot figure out what I did incorrectly. Here is my code:

Your code so far

  <label for="indoor"/>

<input id=“indoor” type=“radio” name="indoor-outdoor"Indoor

<label  for="outdoor">

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

</label>

<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="/submit-cat-photo">
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
  <label>
    <label for="indoor"/>
<input id="indoor" type="radio" name="indoor-outdoor"Indoor</label>
</label>
<label>
  <label  for="outdoor">
  <input id="outdoor" type="radio" name="indoor-outdoor"Outdoor</label>
  </label>
  </form>
  
</main>


Your browser information:

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

Challenge: Create a Set of Radio Buttons

Link to the challenge:

Your input elements are missing the closing angular bracket >

Could you explain what you mean further? I’ve tried adding that to it, but it still says I have not labeled the radio buttons.

"<input id=“outdoor” type=“radio” name=“indoor-outdoor"Outdoor”
this line is wrong, first you don’t need the close tag " in this line, because you already got one in the next line;
second, the “input” tag is wrong, you should always contain both beginning angular bracket and closing angular bracket for every tag. the attributes should be contained inside this two bracket like the id, type and name, but the information you want to be displayed on screen should not be included in, in this case is the word “Outdoor”. so this line should be crrected like this:

delete the label tag and add a closing angular bracket.

<input id="outdoor" type="radio" name="indoor-outdoor"> Outdoor

1 Like

you have just <input, you are missing the >, so your </label> tag is not recognized as that closing angular bracket is considered to be for the input element, you need to have that angular bracket

  1. "label" is not a self-closing tag it has a separate closing tag. you have added a backslash (/) after the double quote in label tag’s for attribute i.e. after for=“indoor”. Remove it from there.
  2. You haven’t closed the input tag for the radio options. It should look like below.
<label for="outdoor">
    <input id="outdoor" type="radio" name="indoor-outdoor"> Outdoor 
</label>

your are missing the closing bracket: input id=“indoor” type=“radio” name="indoor-outdoor"Indoor



<input id=“outdoor” type=“radio” name="indoor-outdoor"Outdoor