The requirement is:
Add a pair of radio buttons to your form, each nested in its own label element. One should have the option of indoor
and the other should have the option of outdoor
. Both should share the name
attribute of indoor-outdoor
to create a radio group.
My codes:
<form action="/submit-cat-photo">
<input id=“indoor” type=“radio” name=“indoor-outdoor”>
<label for=“indoor”>Indoor<button type=“submit” name=“indoor-outdoor”>Submit</button>
</label>
<input id=“outdoor” type=“radio” name=“indoor-outdoor”>
<label for=“outdoor”>Outdoor<button type=“submit” name=“indoor-outdoor”>Submit</button>
</label>
</form>
I can’t pass the challenge, the test result is:
// running tests
Give your radio buttons the name attribute of indoor-outdoor.
Each of your two radio button elements should be nested in its own label element.
// tests completed
What’s going wrong?