Learn HTML by Building a Cat Photo App - Step 22

Tell us what’s happening:
Describe your issue in detail here.
i was asked to:
After the unordered list, add a new image with an src attribute value set to:

https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg

And its alt attribute value to:

A slice of lasagna on a plate.
let me know where i am going wrong?
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>
        </ul>
       <a> <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg" alt="A slice of lasagna on a plate."></a> 

<!-- User Editable Region -->

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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36

Challenge: Learn HTML by Building a Cat Photo App - Step 22

Link to the challenge:

Where did you find the instruction to turn the img element into a link by surrounding <img> tag with anchor tags <a></a>?

after the ununordered list, the ul element i was asked to add an image with src attribute, thats why.


Where did you find the instruction to turn the img element into a link by surrounding <img> tag with anchor tags <a></a> ?

i am confused, i am not able to process what you are asking, there’s clearn instruction to add a new image with a src

Yes, you have to add a new image and set the ‘src’ attribute to the value of https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg, and its ‘alt’ attribute to the value of “A slice of lasagna on a plate.”. But, you have surrounded the ‘img’ element with the anchor tags. There is no such instruction in this step. Delete the opening <a> tag before the ‘img’ element, and delete the closing </a> tag after the ‘img’ element.

1 Like

thanks for the brief info, i got it now, you have to excuse me, i am a beginner and all the terminology i will get around eventually once i am more used to it
thanks again:)

1 Like

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