Tell us what’s happening:
My code is working but the task is showing an error. I’ve tried to solve it in several ways and nothing works. Here’s the error: 8. Your img element should be nested within the anchor (a) element. The entire img element should be inside the opening and closing tags of the anchor (a) element.
My code:
Your code so far
<html>
<body>
<main>
<h1>CatPhotoApp</h1>
<h2>Cat Photos</h2>
<p>Everyone loves <a href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg">cute cats</a> online!</p>
<p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
<!-- User Editable Region -->
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">
<a href="https://freecatphotoapp.com">
<img src="https://bit.ly/fcc-running-cats" alt="A photo of a cat.">
</a>
<!-- User Editable Region -->
</main>
</body>
</html>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0
Challenge Information:
Learn HTML by Building a Cat Photo App - Step 17