I need help with input value, i have given each radio and checkbox value attribute still not working

Tell us what’s happening:

Your code so far

<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>
  <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="https://freecatphotoapp.com/submit-cat-photo">
  <label for="indoor"><input id="indoor" type="radio" name="indoor-outdoor"> 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"> 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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36.

Challenge: Use the value attribute with Radio Buttons and Checkboxes

Link to the challenge:

1 Like

Your value attribute is inside the label text and not on the input element. You also have to keep the label text in the correct case, e.g. Indoor and not indoor.

For example you have:

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

Should be:

<label for="indoor"><input id="indoor" type="radio" name="indoor-outdoor" value="indoor"> Indoor</label>
1 Like

i did the same still couldn’t pass the test , something wrong some where.

  <input id="indoor" type="radio" name="indoor-outdoor"> 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"> 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>

your value attributes are outside the tags

1 Like

@ilenia & @lasjorg is right. Your value attribute is outside the input tag, which should be inside the input tag. Also, you misplaced the label tag on the first radio button.

Hope this helps you.

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

You can post solutions that invite discussion (like asking how the solution works, or asking about certain parts of the solution). But please don’t just post your solution for the sake of sharing it.
If you post a full passing solution to a challenge and have questions about it, please surround it with [spoiler] and [/spoiler] tags on the line above and below your solution code.

1 Like

Oh oh! I did not know about that. I am very sorry if I violated the terms and conditions of FCC. I will edit my answer so that it matches with the terms. Thanks for teaching it to me.

I am really sorry i didn’t mean to share it, i don’t know where the problem is am still trying to figure it out, what did i miss, if you could help me out.


that message wasn’t directed to you

if you have not changed your code, the issue is still the same, below I am quoting a piece of your code with the issue. You have an extra > and the attribute value ended outside the opening tag

thanks @leahleen got it.