Learn HTML by Building a Cat Photo App - Step 22

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>

<!-- User Editable Region -->

        <ul>
          <li>cat nip</li>
         <li>laser pointers</li>
          <li>lasagna</li>
       <a src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg">
       <a alt='a slice of lasagna on a plate.'
        </ul>
        <a img= </a>
        

<!-- User Editable Region -->

      </section>
    </main>
  </body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (iPhone; CPU iPhone OS 17_0_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0.1 Mobile/15E148 Safari/604.1

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 22

One line of code solves this exercise, all of the code you have on top of the ul tag needs to be moved below and placed in an img tag that is self closing so only one tag is needed.

3 Likes

I was able to figure it out by going to this thread: What did I miss up here I'm confused - #10 by udaaff

Hello @shauncodes4 !

The only code that should be within the ul element is the list items of which there are three.
The img does not need an anchor tag, it is a self closing element. This means it can be entered as the following example code from your previous code.

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

You have the correct location for the img and its alt attribute below the ul.

Suggestion: 
Reset the step.* This will not affect any previously completed steps, but will clear any current misplaced code to start fresh with this step only.*

Use the above quoted code as a reference on how to code the img and its alt attribute below the ul.

Keep up the good progress!

2 Likes

figured it out!! thank you!!

1 Like