<label for="indoor"><input id="indoor" type="radio" name="indoor-outdoor"> Indoor</label>
<label for="outdoor"><input id="outdoor" type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label for="loving"><input id="loving" type="checkbox" name="personality"> Loving</label>
<label for="lazy"><input id="lazy" type="checkbox" name="personality"> Lazy</label>
<label for="energetic"><input id="energetic" type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
Hello there.
Do you have a question?
If so, please edit your post to include the Tell us what’s happening section.
The more information you give us, the more likely we are to be able to help.
I’m trying to add radio this
<label for="indoor"><input id="indoor" type="radio" name="indoor-outdoor"> Indoor</label>
<label for="outdoor"><input id="outdoor" type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label for="loving"><input id="loving" type="checkbox" name="personality"> Loving</label>
<label for="lazy"><input id="lazy" type="checkbox" name="personality"> Lazy</label>
<label for="energetic"><input id="energetic" type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
I am trying to figure what i'm doing wrong here
Can you provide a link to the challenge?
Hello! Your radio buttons seem to be in your html already
Is this the challenge you are working on?
If is not that, can you please link it?
Yes. // running tests One of your radio buttons should have the
value
attribute of
indoor
. One of your radio buttons should have the
value
attribute of
outdoor
. One of your checkboxes should have the
value
attribute of
loving
. One of your checkboxes should have the
value
attribute of
lazy
. One of your checkboxes should have the
value
attribute of
energetic
. // tests completed
this is my test result still said not good I am confused
I dont know how to provide the link but I am trying to put a button on a link
Are you working on this challenge?
Yes. I’m working on a chelleng
Are you working on the challenge that I posted the link to? freeCodeCamp has many different challenges and it’s important for us to understand which one you are working on so we can best help.
I am working on Use the value attribute with Radio Buttons and Checkboxes
Ok. It looks like you haven’t added any value
attributes in the code you posted.
Do you see where the value
attribute is in the example?
<label for="indoor">
<!--- ↓ look here! ↓ --->
<input id="indoor" value="indoor" type="radio" name="indoor-outdoor">Indoor
</label>
<label for="outdoor">
<!--- ↓ look here too ↓ --->
<input id="outdoor" value="outdoor" type="radio" name="indoor-outdoor">Outdoor
</label>
It doesn’t look like you have added a value
attribute anywhere. You need to add a value
attribute to each of those five inputs, like shown in the example.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.