Tell us what’s happening:
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="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality"> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
<label><input type="radio" name="indoor"> Indoor</label>
<label><input type="radio" name="outdoor"> Outdoor</label><br>
</main>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36
.
Challenge: Use the value attribute with Radio Buttons and Checkboxes
Link to the challenge:
Hi Vivik, welcome to the FCC forum.
In this exercise you need to add value attributes. e.g. value="indoor"
The tests tell you where they are missing:
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
.
i’ve already performed the task and still showing no progress
CatPhotoApp
Click here to view more cat photos.
Things cats love:
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
Top 3 things cats hate:
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality"> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
<label>
<input type="checkbox" name="personality" />
Personality
</label>
@vivek.dabby3312 you’re on the right path here… just a few more steps remaining. In the example above, we have two attributes set for input
:
- type=“checkbox”
- name=“personality”
See if you can look into the input attribute called “value”. That should give you an idea on how to solve this problem… goodluck!
1 Like
Hey buddy ! you have to add the “value” attribute to all your radio buttons and checkboxes you can do in this way:
<label>
<input type="radio" name ="indoor" value="indoor">Indoor
</label>
In this way you can complete your challenge.
Hope it helps!
HAVE A GREAT DAY !!