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 -->

<!-- User Editable Region -->

      <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>

      <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">

<!-- 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/115.0.0.0 Safari/537.36

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

Link to the challenge:

What’s your issue? Please describe it.

I have tried to do this task, it keeps returning an error.
i need help here.
The error message is:

Sorry, your code does not pass. Keep trying.

Your anchor (a) element should have an opening tag. Opening tags have this syntax: <elementName>.

Can you share your new code? I dont see anything from the code posted that shows where you attempted this challenge

Please look at the description it shows:

Other types of content can also be turned into a link by wrapping it in anchor tags.

For example if you want to make a text clickable, you use

<a href="link">some text</a>

To make image, use

<a href="link">(Use Image Tag with required attributes here)</a>

<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>

Take a look at this line, and you can use it as an example. This is from when you put the link around the word “cat photos” You want to do the same thing here, except this time you are putting the link around the img. Compare the anchor tags <a> you have in this line compared to what you just posted

What is different between how you put the link around cat photos and how you attempted to put the link around the img

1 Like

I have gotten the right code. Thanks a lot

1 Like

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