HTML programing

Please help us complete this task. I don’t understand what I’m doing wrong:

Step 61

In order to make a checkbox checked or radio button selected by default, you need to add the checked attribute to it. There’s no need to set a value to the checked attribute. Instead, just add the word checked to the input element, making sure there is space between it and other attributes.

Make the first radio button and the first checkbox selected by default.

 <label><input id="indoor" type="radio" name="indoor-outdoor"  value="indoor" checked /> Indoor</label>
            <label><input id="outdoor" type="radio" name="indoor-outdoor" value="outdoor"> Outdoor</label>

Please post a link to the Step. Also, please talk to us about how the instructions or error message is confusing. Thanks

Learn HTLM by building a cat photo app

I tried inserting checked right after the id attribute, at the end of the input element. But the result is the same: The first checkbox is missing the checked attribute.

Welcome to the forum @DariaGrishanova

The code you supplied is correct for the input type radio.
That was step 1.

For the second step, you need to add the attribute to the input type checkbox.

Happy coding

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.