Learn HTML by Building a Cat Photo App - Step 15

I need help with this step. I have tried all variations, but can’t seem to get around. At this point I’m just trying anything. What shouldI do? I feel stuck.
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>
    <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>
    </main>
  </body>
</html>

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/15.5 Safari/605.1.15

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

Link to the challenge:

This exercise is about making the img element become a link.

This is done the same way as turning any word into a link. You need to add an anchor element around the img element.

I suggest that you click the reset button (this will make the code go back to its initial state), then add the anchor opening tag on the left side of the img and the closing tag on the right side.

You can review steps 10/11/12 to see how anchor elements are written.

1 Like

Please don’t change the code if it wasn’t said.
The task is: “Turn the image into a link by surrounding it with necessary element tags.”
When something has to be turned into a link it should be wrapped with ‘a’ tags:

<a href="url"><img src="url"></a>
1 Like

This was helpful thank you

2 Likes

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