Excercise 55 not solving

The text Loving should no longer be located directly to the right of your checkbox. It should be wrapped in a label element. Make sure there is a space between the two elements.

Please make sure to post the code that you have already done with your posts, there’s no way for us to tell what’s wrong when we can’t see what you’ve done

1 Like
<h1>CatPhotoApp</h1>

<main>

  <section>

    <h2>Cat Photos</h2>

    <!-- TODO: Add link to cat photos -->

    <p>Click here to view more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a>.</p>

    <a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>

  </section>

  <section>

    <h2>Cat Lists</h2>

    <h3>Things cats love:</h3>

    <ul>

      <li>cat nip</li>

      <li>laser pointers</li>

      <li>lasagna</li>

    </ul>

    <figure>

      <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg" alt="A slice of lasagna on a plate.">

      <figcaption>Cats <em>love</em> lasagna.</figcaption>  

    </figure>

    <h3>Top 3 things cats hate:</h3>

    <ol>

      <li>flea treatment</li>

      <li>thunder</li>

      <li>other cats</li>

    </ol>

    <figure>

      <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/cats.jpg" alt="Five cats looking around a field.">

      <figcaption>Cats <strong>hate</strong> other cats.</figcaption>  

    </figure>

  </section>

  <section>

    <h2>Cat Form</h2>

    <form action="https://freecatphotoapp.com/submit-cat-photo">

      <fieldset>

        <legend>Is your cat an indoor or outdoor cat?</legend>

        <label><input id="indoor" type="radio" name="indoor-outdoor" value="indoor"> Indoor</label>

        <label><input id="outdoor" type="radio" name="indoor-outdoor" value="outdoor"> Outdoor</label>

      </fieldset>

      <fieldset>

        <legend>What's your cat's personality?</legend>

       ' <input id="loving" type="checkbox"> <label for ="Loving" value="loving"></label>'

      </fieldset>

      <input type="text" name="catphotourl" placeholder="cat photo URL" required>

      <button type="submit">Submit</button>

    </form>

  </section>

</main>

You no longer have the text for Loving, you’ve removed it completely. It should look like:

<input id="loving" type="checkbox"> <label for ="Loving" value="loving">Loving</label>```

still showing the error

Please show the error :0

along with your code

Loving
error=" The new label element should have a for attribute with the value loving . You have either omitted the value or have a typo. Remember that attribute values should be surrounded with quotation marks."

i need to see how you put it in

’ Loving’

That is not your code, that is a word.

When you can paste the code from the exercise I will continue to help you, otherwise have a wonderful day.

I by mistake made a new topic

I see the issue here, you have a typo in either input Id or Label for attribute

your input Id have lowercase L in “loving” and your label for have uppercase L for “Loving”
Change either Id or For so both are match with each other

<input id="loving" type="checkbox"> <label for ="loving" value="loving"></label>'
or
<input id="Loving" type="checkbox"> <label for ="Loving" value="loving"></label>'

Loving

my code is this

error is this

the text Loving should no longer be located directly to the right of your checkbox. It should be wrapped in a label element. Make sure there is a space between the two elements

1 Like

Your code? Can’t see your code

Has someone solved the problem yet ?

Loving