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 -->
      <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"</a> alt="A cute orange cat lying on its back."><a href="https://freecatphotoapp.com"</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/116.0.0.0 Safari/537.36

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

Link to the challenge:

Hello.

Advice: for new post, you may describe your issue. If you tell us what is your problem, we can help you more easy. If possible, it would be nice if you could tell us what type of error this step says. So, You can learn a bit how the things works. It´s better for everybody!
Keep that in mind.

Solution:
In this step, you need to convert a image in a link.

the correct way to do this, is like this example.
<a href="https://www.somelink.com"><img src="someimage.jpg"></a>

Review the example and adsjust your code.

Grets.

There are more then one mistakes in your code:

  1. You used an closing anchor tag </a> after the image without an opening one before the image.

  2. You used the “alt” attribute outside the image element
    Remember how it is used: <img src="...." alt="....">

  3. You tried to add a link after the image where it does not belong. It is missing a bracket in the opening tag and an element between the <a>and </a>.

I would suggest you reset this task and start with a clean sheet again.
Then you wrap the complete code for the image in a link.

It should look somehow like:

<a href="..."><img src="..." alt="..."></a>

1 Like

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