Can't Check Radio Buttons and Checkboxes by Default00001

I cant check Radio Buttons and Checkboxes by Default while Using the value attribute with Radio Buttons and Checkboxes

This is not enough information to help you. Is this a project you are working on? If so then you need to provide us a link to it so we can test it for ourselves. If this is concerning something else then you need to give us all the details so we can see what you are talking about.

1 Like

Check Radio Buttons and Checkboxes by DefaultPassed

If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.


What have you tried? What does your code look like? What part isn’t working correctly?

1 Like

Tell us what’s happening:
Describe your issue in detail here.

I can’t check Radio Buttons and Checkboxes by Default while Using the value attribute with Radio Buttons and Checkboxes

  **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>
Check Radio Buttons and Checkboxes by DefaultPassedCheck Radio Buttons and Checkboxes by DefaultPassed  <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="">
  <label for="indoor"><input id="indoor" type="radio" name="indoor-outdoor" checked> value="indoor"> Indoor</label>
  <label for="outdoor"><input id="outdoor" type="radio" name="indoor-outdoor" value="outdoor"> Outdoor</label><br>
  <label for="loving"><input id="loving" type="checkbox" name="personality" checked>value="loving"> Loving</label>
  <label for="lazy"><input id="lazy" type="checkbox" name="personality" value="lazy"> Lazy</label>
  <label for="energetic"><input id="energetic" type="checkbox" name="personality" value="energetic"> Energetic</label><br>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
  **Your browser information:**

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36

Challenge: Check Radio Buttons and Checkboxes by Default

Link to the challenge:

I have merged your duplicate topics.

1 Like

still i didn’t get any solution

Your question was asked in two threads. I combined them into a single thread so that you are more likely to get useful help.

1 Like

just type checked keyword at the end of input element

Please use meaningful titles rather than just jamming random numbers into the topic title. Thanks.

1 Like

Please actually interact with the people trying to help you instead of just quoting some random portion of a previous post. Thanks.

1 Like

It looks like you malformed your input elements. The syntax highlighting here is trying to show you where. There is something screwy going on after the attribute checked in your elements.

1 Like

i copy/pasted your code , it passes for me.
i think you should reset the topic and try again.
if it still doesn’t work try different browser.

1 Like

Yes u get me here. I know how to pass the problem …I have to remove


this, but I need it to stay,what’s the way to keep it in my code then

Hmm, that code shouldn’t pass given the malformed syntax.

You certainly should not remove that. That part is needed.

Well, what part of the code I highlighed is not valid? Why do you have two >?

1 Like

it does not matter for this challenge as after you close input element everything after that has nothing to do with <input> as it was close before value="indoor">
this is not causing the problem.

<input type="radio" value="etc" > everything after that is a text even  > this its valid but is a  typing error
1 Like