Creating checkboxes. What is the problem?

Creating checkboxes. What is the problem?
0

#1

Hey guys this is my code and I don’t see what I’m doing wrong? I keep getting the error saying that I didn’t end the label element when I really did. Also I don’t quite sure know what nesting my own elements mean, I made sure each label element is with it’s own input. For the checkboxes, Imade sure the name is set as persoanaity for each and one of the labels, I did this for every label and i dont get what the issue is. ANy help will be appreciated.


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

  <label for="Timid"><input id="timid" type="checkbox" name="Personality">alone</label>

  <label for="Outgoing"><input id="outgoing" type="checkbox" name="Personality">Extroverted</lable>

    <label for="Determined"><input id="Determined" type="checkbox" name="Personality">Thinker</label>

</main>

The errors i get down below

Each of your three checkbox elements should be nested in its own label element.
Make sure each of your label elements has a closing tag.
Give your checkboxes the name attribute of personality.


What am I doing Wrongg?
#2

I can’t read your code.

Your html is being rendered instead of being displayed as code.

You can hit pre-formatted text icon in the editor to format your code.


#3

Just to expand on what @shimphillip said:

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make easier to read.

Note: Backticks are not single quotes.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.


The forum will try to render HTML as HTML if you don’t do this


#4

I don’t the what the exercise is but I see an error with your label for values.

They should match exactly your ids. (Notice capitalization matters)


#5

Hey guys this is my code and I don’t see what I’m doing wrong here? I keep getting the error saying that I didn’t end the label element when I really did. Also I don’t quite sure know what nesting my own elements mean, I made sure each label element is with it’s own input. For the checkboxes, I made sure the name is set as personality for each and one of the labels, I did this for every label and i don’t get what the issue is. Any help will be appreciated.

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

  <label for="Timid"><input id="timid" type="checkbox" name="Personality">alone</label>

  <label for="Outgoing"><input id="outgoing" type="checkbox" name="Personality">Extroverted</lable>

    <label for="Determined"><input id="Determined" type="checkbox" name="Personality">Thinker</label>

The errors i get down below

Each of your three checkbox elements should be nested in its own label element.
Make sure each of your label elements has a closing tag.
Give your checkboxes the name attribute of personality.


#6

This appears to be the same code you posted 3 hours ago. The same replies you were given before by other users is still valid. Pay attention to the exact case of the the for attribute, id attribute, and name attribute values compared to what the instructions are asking you to use.

Edit: One problem is the instructions told you the name attribute of all three checkboxes should be personality. Instead you used Personality. Some of your checkbox input id values do not exactly match the for attribute values of the corresponding label element.

By the way, all of the answers you received earlier were 100% relevant.


#7

Yes, all of the answer on that post were irrelevant with what I’m trying to accomplish. Maybe I could use some help from you!


#8

#9

#10

#11

#12

The second closing tag has a typo
image