Learn HTML by Building a Cat Photo App - Step 56

Tell us what’s happening:

Describe your issue in detail here.

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <section>
        <h2>Cat Photos</h2>
        <!-- TODO: Add link to cat photos -->
        <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</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>

<!-- User Editable Region -->

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

<!-- User Editable Region -->

          </fieldset>
          <input type="text" name="catphotourl" placeholder="cat photo URL" required>
          <button type="submit">Submit</button>
        </form>
      </section>
    </main>
  </body>
</html>

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 56

Welcome to the forum
image
The instructions for this step are asking to wrap the label element around a word. Unfortunately, it is also wrapped around the input element.
When the opening label element is moved to the correct spot, it will need a for attribute.

Happy coding

1 Like

Well try buddy, but do a little change :blush:

First when we wrap any word into a label text, then we use below syntax.

<label>Coding</label>

So kindly put your label after your input attribute .

Second thing is kindly put the for attribute into your label.
Like

<label for="coding">Coding</label>

One thing need to remember is put the same value into your for attribute as your label text.

Hope you understand.

i don’t know why code not run

It wants you to wrap the text Loving in the label element and add a for attribute to the opening tag of the label element. To wrap the text place the opening label element tag before the text and NOT before the input element. As for the way to format the for attribute I suggest referencing back to your id attribute.

1 Like

Here you need to wrap your word Loving into label tag

After your input tag…

As shown below…

<label>Coding</label>

Hope you understand.

1 Like

i uderstand finally code run, elemet Label have up on element input

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.