Learn HTML by Building a Cat Photo App - Step 15

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

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Click here to view more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a>.</p>
      <img <a href="https://freecatphotoapp.com"src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."<a/>>
    </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/107.0.0.0 Safari/537.36

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

Link to the challenge:

Hello! I see you have some code posted, but was there something we can help you with?

I don’t know what is wrong with my code. I have to turn the image into a link but my code not passed

Looks like you have the anchor element, but I’m noticing that your first anchor element tag is missing the closing bracket: “>” Place that where it is needed and try to run your code again

Could you show me where exactly is it missing?

I think you’ve tried to nest one element inside another unsuccessfully.
You should leave your img element unaltered but enclose it wholly within anchor tags.
You can add an attribute to your opening anchor tag to point to the required URL.

To nest a paragraph within a div for instance:

<div><p>This is a paragraph</p></div>
1 Like