h2o
October 9, 2020, 10:24am
1
Tell us what’s happening:
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
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://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="https://freecatphotoapp.com/submit-cat-photo">
<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>
</form>
</main>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36 Edg/83.0.478.50
.
Challenge: Use the value attribute with Radio Buttons and Checkboxes
Link to the challenge:
Learn to code. Build projects. Earn certifications.Since 2015, 40,000 graduates have gotten jobs at tech companies including Google, Apple, Amazon, and Microsoft.
You should add a value
attribute to the required elements
<input id="indoor" type="radio" name="indoor-outdoor" value="indoor">
h2o
October 9, 2020, 10:37am
3
should i just add that value to old work or i need to rewrite all again with add value?
ilenia
October 9, 2020, 10:39am
4
add the attribute value to existing elements
h2o
October 9, 2020, 10:41am
5
i did but its does not work it will remove the indoor work next to the click
I did not get it… please explain
h2o
October 9, 2020, 10:44am
7
this is what i done but it remove the word indoor from the website on the right
s
Check your <
and >
clearly…
Value should be inside the <input>
… maybe you missed >
h2o
October 9, 2020, 10:50am
9
<input id="indoor" type="radio" name="indoor-outdoor" value="indoor"></label>
h2o:
indoor"><
You’ve removed label value indoor that’s why, it’s not showing up on preview
1 Like
this one looks correct.
Just update the question with your no working answer some typos
are the reason for the failure
h2o
October 9, 2020, 10:56am
12
<input id="indoor" type="radio" name="indoor-outdoor" value="indoor"></label>
<label for="outdoor"><input id="outdoor" type="radio" name="indoor-outdoor" value="Outdoor"></label><br>
<label for="loving"><input id="loving" type="checkbox" name="personality" value="Loving"></label>
<label for="lazy"><input id="lazy" type="checkbox" name="personality" value="Lazy"></label>
<label for="energetic"><input id="energetic" type="checkbox" name="personality" value="Energetic"></label><br>
don’t’ remove those value in between the answer should b like
-<label for="outdoor"><input id="outdoor" type="radio" name="indoor-outdoor" value="Outdoor"></label><br>
+<label for="outdoor"><input id="outdoor" type="radio" name="indoor-outdoor" value="outdoor"> Outdoor</label><br>
h2o
October 9, 2020, 11:09am
14
i have fixed it but still does not let me pass outdoor
You have Outdoor it should be outdoor (The upper case O)
Issue may be due to Capital O you are using can you try lowercase for that
h2o
October 9, 2020, 11:15am
16
i did that too still wont work very strange
Paste the whole code one more time here please so we can look at it or update it in the question
Also which browser do you use there seems to be issue with safari browser not sure though .
h2o
October 9, 2020, 11:23am
18
i am using microsoft edge browser
<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>
label of indoor seems to be missing can you check it once?
ilenia
October 9, 2020, 11:25am
20
you have changed the text - it was with the first letter uppercase before, now it’s all lowercase
you could try to fix it, or reset your code and only add the value attribute without changing anything else