Learn HTML by Building a Cat Photo App - Step 9

hi, i need help with this
All img elements should have an alt attribute. The alt attribute’s text is used for screen readers to improve accessibility and is displayed if the image fails to load. For example, <img src="cat.jpg" alt="A cat"> has an alt attribute with the text A cat.

Inside the img element, add an alt attribute with this text:

A cute orange cat lying on its back

Your code so far
< img src =" alt = “A cute orange cat lying on its back”>

      <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 =" alt = "A cute orange cat lying on its back">

<!-- User Editable Region -->


Your browser information:

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

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

Link to the challenge:


There is no need to make a new img element. The instructions want us to place the alt after the link within the existing img element.

Suggestion: Reset the step to clear any possible issues.
Enter the alt with the value at the end of the existing img.

I hope this helps you!

Happy coding! :slight_smile:

Dude you are very close and did very gud effort but need to add in existing <img> element

but the right syntax is

<img src="link" alt="text">

how about this?
You can link to another page with the anchor (a) element. For example, <a href='https://freecodecamp.org'></a> would link to freecodecamp.org.

Add an anchor element after the paragraph that links to https://freecatphotoapp.com. At this point, the link won’t show up in the preview.

1 Like

use your example above with the element, replace the freecodecamp url with the freecatphotoapp. don’t forget your closing tag

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