How to turn the image into a link?

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

  **Your code so far**

<html>
<body>
  <h1>CatPhotoApp</h1>
  <main>
    <h2>Cat Photos</h2>
    <!-- TODO: Add link to cat photos -->
    <p>Click here to view more <a_blank="https://freecatphotoapp.com">cat photos</a>.</p>
    <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">
  </main>
</body>
</html>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0

Challenge: Step 13

Link to the challenge:

I don’t understand the question. Why are you asking how to turn the image into a link? That is not the purpose of this exercise. You are supposed to, “Add a target attribute with the value _blank to the anchor ( a ) element’s opening tag, so that the link opens in a new tab.”

You have mentioned wrong challenge (actual challenge is 14) but its fine i understand your problem.

In this challenge you need to change the image to act as a link.
You can achieve this by adding an anchor tag first with the href attribute and the value should be in the description.

Then start the image tag (<img) the content here should be same as your previous challenge after the self closing tag close the anchor tag ().

Let me know if this works.

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