Checkboxes by Default - Line 42

I have followed the directions for adding a default checked box to the first line of my form - line 42. So I don not see what my problem would be moving forward?

Note: thanks for the previous help as well, however, I do not understand the 3 back ticks for readability - apologies.

Your code so far

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {color: red;}

  h2 {font-family: Lobster, Monospace;}

  p {font-size: 16px;
    font-family: Monospace;}

  .thick-green-border 
   {border-color: green;
    border-width: 10px;
    border-style: solid;
    border-radius: 50%;}

  .smaller-image {width: 100px;}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" alt="A cute orange cat lying on its back. " src="https://bit.ly/fcc-relaxing-cat"></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" checked> Indoor</label>
  <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
  <label><input type="checkbox" name="personality"> Loving</label>
  <label><input type="checkbox" name="personality"> Lazy</label>
  <label><input type="checkbox" name="personality"> Energetic</label>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>







Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/601.7.8 (KHTML, like Gecko) Version/9.1.2 Safari/601.7.7.

Link to the challenge:
https://www.freecodecamp.org/challenges/check-radio-buttons-and-checkboxes-by-default

I see a radio button checked, the challenge says

Set the first of your radio buttons and the first of your checkboxes to both be checked by default.

:wink:

1 Like

Your problem is within these lines

  <label><input type="checkbox" name="personality"> Loving</label>
  <label><input type="checkbox" name="personality"> Lazy</label>
  <label><input type="checkbox" name="personality"> Energetic</label>