Learn HTML by Building a Cat Photo App - Step 15

Tell us what’s happening:

Can someone please assist me, I don’t properly understand where I might be at fault. This is the comment i keep on getting “Your anchor (a) element should link to https://freecatphotoapp.com. You have either omitted the URL or have a typo.”

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>

<!-- User Editable Region -->

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

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

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 15

Hi there. Can you look at the example of how to convert an image to a link and try to figure out what’s different between what you wrote and the sample?

Hi, I just made it exactly the same as the example but the comment is still the same

Are you quite sure about it?

Cause if there was some visible element blocking an anchor element, you’d never be able to click it.

Likewise, in order for it to head towards your destination; you need to properly set the href attribute.

Unfortunately, I can only send it once since I’m a new user. But I tried starting over and I still get the same comment

Let’s look at the example again.

<a href="example-link">
 <img src="image-link.jpg" alt="A photo of a cat.">
</a>

Now then, which element is nested? Hint: nested means what it sounds like. Inside another element.

And what is the name of the attribute on the a element?

Edit: I just saw another img element in your code. You don’t need two images for this challenge.

1 Like