Learn HTML by Building a Cat Photo App - Step 22

It says: “The new image does not have an alt attribute. Check that there is a space after the opening tag’s name and/or there are spaces before all attribute names.” Even though there is an alt attribute. Where should I replace it?

Your code so far

        <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>
        <h2>Cat Lists</h2>
        <h3>Things cats love:</h3>

<!-- User Editable Region -->

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

<!-- User Editable Region -->


Your browser information:

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

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

Link to the challenge:

1 Like

What is Alt Text?
here is some docs about it …

1 Like

Add the alt attribute with the value of 'A slice of lasagna on a plate' to your a element so that if the image fails to load the user will see a text of what the image is about.

<a src="" alt="" target="">Link</a>

@zaklina to post a link you could use the insert link button:

1 Like

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