# Check Radio Buttons and Checkboxes by Default

**URL:** <https://forum.freecodecamp.org/t/check-radio-buttons-and-checkboxes-by-default/146529>\
**Category:** General\
**Created:** [September 7, 2017, 1:50pm UTC](https://forum.freecodecamp.org/t/check-radio-buttons-and-checkboxes-by-default/146529 "2017-09-07T13:50:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gvj252](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@gvj252](https://forum.freecodecamp.org/u/gvj252)\
**Post date:** [September 7, 2017, 1:50pm UTC](https://forum.freecodecamp.org/t/check-radio-buttons-and-checkboxes-by-default/146529/1 "2017-09-07T13:50:48Z")

</div>

**Tell us what’s happening:**

**Your code so far**

```auto
<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"> 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 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36`.

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

---

<div class="post-metadata">

**Author:** ![gvj252](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@gvj252](https://forum.freecodecamp.org/u/gvj252)\
**Post date:** [September 7, 2017, 5:06pm UTC](https://forum.freecodecamp.org/t/check-radio-buttons-and-checkboxes-by-default/146529/3 "2017-09-07T17:06:40Z")

</div>

Hello sir,

Here is my code

Where should i push the ‘checked’ in my code?  
thanks in advance  
i have pushed it into 1st input tag and as well as checkbox.

```auto
 <label><input type="radio" name="indoor-outdoor"> Indoor</label>
  <label><input type="radio" name="indoor-outdoor">

<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"> 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" checked> Energetic</label>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>

```

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 17, 2021, 8:40pm UTC](https://forum.freecodecamp.org/t/check-radio-buttons-and-checkboxes-by-default/146529/5 "2021-01-17T20:40:18Z")

</div>


