There should be an img right after the <ul> tag

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Click here to view more <a target="_blank" href="">cat photos</a>.</p>
      <a href=""><img src="" alt="A cute orange cat lying on its back."></a>
      <h2>Cat Lists</h2>
      <h3>Things cats love:</h3>
        <li>cat nip</li>
        <li>laser pointers</li>
      </ul><img src= ""</img> <alt= "A slice of lasagna on a plate">
  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Safari/605.1.15

Challenge: Step 21

Link to the challenge:

Hi again, I’m just a little stuck on this one. I thought I had it right. Simple answers are best. Break it down for me. :slight_smile: please tell me where I’m going wrong

Here is your first img tag:

<img src="" alt="A cute orange cat lying on its back.">

Here is your second img tag at the end of the unordered list:

<img src= ""</img> <alt= "A slice of lasagna on a plate">

Image tags are self closing. The alt attribute should be inside the image tag.

What are you telling me? The first one is correct and the second is not? I’ve amended this multiple times still don’t seem to be any closer. It keeping saying there needs to be a Img after ul which there is. I’m failing to see what I’m missing. Please explain again.

Side not I seem to have figured it out. Seconds after posting. However I don’t understand why there is a value at the end when there is no <a opening value can somebody explain :slight_smile:

<a href=""><img src="" alt="A cute orange cat lying on its back."></a>

The first image of the cat lying on its back is inside an anchor tag because, in addition to adding the image to your page, you wanted to turn the image into a hyperlink. Notice how if you click on the image, it takes you to

<img src="" alt="A slice of lasagna on a plate">

The image of lasagna is not inside an anchor tag because you are not creating a hyperlink, you are only inserting the image. If you click on the lasagna it will not take you to a new page.

The alt attribute, alt=“A slice of lasagna on a plate”, is always required within an img element. If for some reason the image fails to load, the text “A slice of lasagna on a plate” will appear in its place.

I hope this helps!

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