Radio and Checkbox default setting

I keep getting a failure message: You should not change the inner text of the Indoor label.
You should not change the inner text of the Loving label.

After reading similar posts, I’m no closer to a resolution. So far, I have:
. copied and pasted the code out of the training video
.moved the word “checked” after the value attribute that reportedly worked by someone who was trying to resolve this issue for someone else
. disabled popup blocker on safari and my security software (suggested by one of the respondents to someone with the same issue).
.played with spacing between the name quotation mark and the word checked
I believe this form shows all my code…hopefully someone can easily identify where I am going wrong.

thanks.

  **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://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" 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://www.freecatphotoapp.com/submit-cat-photo">
  <label for="indoor"><input id="indoor" value="indoor"  type="radio" name="indoor-outdoor"checked> Indoor</label>
  <label for="outdoor"><input id="outdoor" value="outdoor"   type="radio" name="indoor-outdoor"> outdoor</label><br>   
  <label for="loving"><input id="loving" value="loving"  type="checkbox" name="personality"checked> Loving</label>
  <label for="lazy"><input id="lazy" value="lazy" type="checkbox" name="personality" > Lazy</label>
  <label for="energetic"><input id="energetic" value="energetic" type="checkbox" name="personality"> Energetic</label><br>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>
</main>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.5 Safari/605.1.15

Challenge: Check Radio Buttons and Checkboxes by Default

Link to the challenge:

I just tested it and it works fine

value="indoor" type="radio" name="indoor-outdoor"checked>
name="personality" >

Try to use the spaces correctly. Between “indoor” and type you got two space and outdoor" and checked. You got the same problem in some of your lines. Check the spaces. P.S: Also the code work well for me.
It’s seems weird what I said, but is important. (probably for me)

1 Like

You are absolutely correct, its important to pay attention to details when coding. But, also its something you get used to do correctly with repetition, (You cant imagine how many times i ended up doing all my code from scratch just because i forgot a little
;

Thanks so much. I’ll fix spacing and report back. Odd that it works for you. Could it be that I’m working on an older MacBookPro?

1 Like

Reset spacing, checked capitalization, checked open/close tags. Just won’t work. I’ll go over it all again and then put it away till tomorrow if it doesn’t pass. Again, appreciate the help.

Still doesn’t work - yet, the right hand column that shows the finished page looks like it should …the first radio button and first checkbox are filled in.

Switched to Firefox and my code for radio-checkbox default passed. Go figure! I’ll continue using Firefox .

1 Like

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