Code does not run

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

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg">
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A relaxing cat.">
<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
</main>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Linux; Android 10; TECNO B1g Build/QP1A.190711.020) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.58 Mobile Safari/537.36

Challenge: Add Images to Your Website

Link to the challenge:

Remove the first image element which does not have an alt attribute and it should work. The test is looking for an img with both src and alt attributes non-empty.

Images should have an alt attribute unless the image is just for decorative purposes and doesn’t add any meaning to the page. It’s coz the text in alt attribute is loaded if the browser fails to load the image. It is also read by screen readers for the visually impaired who can’t see the image.

1 Like

image