Plse help me how to create a checkbox

Tell us what’s happening:

Your code so far


<h2>CatPhotoApp</h2>
<main>
  <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>
  <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 for="indoor"><input id="indoor" type="radio" "checkbox"
  name="indoor-outdoor"-personality>
  Indoor</label>
    <label for="outdoor"><input id="outdoor" type="radio""checkbox"
  name="indoor-outdoor"-"personality>
  Outdoor</label>
  <label for="personality">
  <input id=personality
  type="radio""checkbox"
name="indoor"-"outdoor"-"personality">
personality</label>
  </br>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</main>

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.132 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/create-a-set-of-checkboxes

The challenge says to add checkboxes, not modify the given code. Please reset the code using the reset button and carefully addthe requested checkboxes. Read the instructions carefully…

The checkboxes do not appear on the page and this error message is encountered.

  • Your page should have three checkbox elements.
  • Each of your three checkbox elements should be nested in its own label element.
  • Give your checkboxes the name attribute of personality.

First point of error message says that you are required to have three checkboxes. The problem is with the input type. You have done this.

But to add checkboxes, you have to set input type to checkbox, like this

type=“checkbox”

Now, the third point of error message is another reason for your problem. You are required to set the name attribute of each checkbox to “personality”

So edit this part of your each checkbox element

and set it to

name="personality"

Edit your code and it will work :slight_smile:

2 Likes

Thanks bro. Forrr helping meeee

1 Like