Where do i go from here

Tell us what’s happening:

Your code so far

<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>
  <li>cat nip</li>
  <li>laser pointers</li>
<p>Top 3 things cats hate:</p>
  <li>flea treatment</li>
  <li>other cats</li>
<form action="https://freecatphotoapp.com/submit-cat-photo">
  <label for="indoor"><input id="indoor" type="radio" name="indoor-outdoor" checked> value="indoor"> Indoor</label>
  <label for="outdoor"><input id="outdoor" type="radio" name="indoor-outdoor" checked> 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>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36 OPR/70.0.3728.178.

Challenge: Check Radio Buttons and Checkboxes by Default

Link to the challenge:

Hey @BigBabyBoy :wave: , in this challenge you have to set the first of your radio buttons and the first of your checkboxes to both be checked by default.
To do that you have to add the checked attribute to your inputs - your radio and checkbox inputs - like you did in a previous challenge where you’ve added the required attribute.

Hint: <input id="indoor" type="radio" name="indoor-outdoor" checked> value="indoor" checked>, and do this for the other inputs, i hope this helped :smiley:.

1 Like

You need to add “checked” for the default checked option ,Works similar for radio buttons and check boxes.

<input id=“indoor” type=“radio” name=“indoor-outdoor” value=“indoor” checked>
<input id=“loving” type=“checkbox” name=“personality” value=“loving” checked>

1 Like