Learn HTML by Building a Cat Photo App - Step 15

Tell us what’s happening:
I’m trying to figure out how to turn this image into a link. I put the (a) attribute around the img, but that was still wrong.

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 target= href="https://freecatphotoapp.com"</a> <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_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:

hI @moriliatibrahim !

It looks like you have syntax errors here which is why the test is not passin

I would reset the lesson.

For the opening anchor tag, make sure you are using the same correct syntax as you did earlier here

Also make sure the ending </a> goes after the <img> element.

Hope that helps!

I thought I used that syntax and every time I put <a/> at the end of the img it still doesn’t work. the image disappears.

<a/> idk why it didn’t let me put that

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

The forward slash should go before the letter a

This is incorrect

This is correct

<a>target="_blank" 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>

I dont know what I did wrong

This part here

Goes inside the opening anchor tag

<a place here> 

Once you fix that then it should pass

oh wooooowwww. thank you so much. I appreciate your patience

1 Like