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>
    <h1>CatPhotoApp</h1>
    <main>
      <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>
      <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back." href="https://freecatphotoapp.com " target="_blank">
      
    </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/106.0.0.0 Safari/537.36

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

Link to the challenge:

:balloon: Hi, welcome to the forum!
We see you have posted some code but did you have a question?

i can’t solve this question plz tell me the code

Remove the extra space at the end of the href value.
It has to be exactly what was given.

Then move the href into an anchor tag.
And place the tag on the left of the image.

Closing tag on the right.

Please tell us what part of this step you don’t understand. Just read and try until you get the result. Your ‘img’ element should be nested between an opening and closing ‘a’ tag element. Your ‘a’ element is linked to given url address in the task. You’ve already had this solution like an example in your ‘p’ element in your code.

i can’t understand where to use anchor tag

An opening ‘a’ tag before ‘img’ element and a closing ‘a’ tag after ‘img’ element. Add to the opening ‘a’ tag ‘href=’ and url given in the step. You put ‘href’ in the ‘img’ element! Why? You also don’t need a target attribute.

Click on the Restart Step button first to put everything back to the start please.

Then after that look at this example of an anchor tag:

Do you see how an anchor tag is created around something?
There is a left side and a right side and in between some words.

You need to do this for the img element also.

You can also review how to create anchor tags in step 10-12

Please do not create duplicate topics. I have closed the duplicate.

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