Learn HTML by Building a Cat Photo App - Step 9

Tell us what’s happening:

My code runs in the console but I can’t move on from step 9

A cute orange cat lying on its back

Should I just restart? The internet said it may an HTML error, I’ve checked for spaces. I am new to coding so I could be missing something, but I did use R which is similar in college.

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>See more cat photos in our gallery.</p>

<!-- User Editable Region -->

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

<!-- User Editable Region -->

  </body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 9

1 Like
<img src="cat.jpg" alt="A cute orange cat lying on its back">
 </main>

Thats what my code said it printed out weird

the image src is wrong, don’t copy the example, add the alt text to the image you created recently

1 Like

Hey Buddy , See the instructed Code is given below.

 <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg">

Hey You have write this alt attribute code in 2nd line. You need to put it in 1st one img element

Hope You Understand.

Hi @sophialehmer I think I can spot the problem.

Your two image tags are lacking the closing forward slash “/”. So, to solve the errors you’re encountering, add a closing forward slash “/” to both of the image tags like this: and ensure to include the alt attribute to both of the image elements/tags. Try this solution and share your experience again. We would love to continue helping. Thank you and happy coding.

Hello and welcome to the forum community @sophialehmer !

Good attempt!

As im59138 suggested, the alternate or alt attribute would be added to the existing image tag at the end before the closing > bracket.

Suggestion: Reset the step (it will not affect any of your previously completed steps), and add the alt attribute to the current img.
We do not need to add a new img element.

I hope this helps you and wish you good progress on your coding journey. :slightly_smiling_face: