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 <a href=https://freecatphotoapp.com src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange 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/116.0.0.0 Safari/537.36 OPR/102.0.0.0

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

Link to the challenge:

“Turn the image into a link by surrounding it with necessary element tags.”

Instead of surrounding the img tag with the a tags you put the a tags inside of the img tag (or at least the opening a tag).

Look again at how you created the “cat photos” link. You put an opening a tag before those words and a closing a tag after those words. You “surrounded” those words with a tags. That’s what you want to do to the img element.

Welcome to the community!

To turn the img into a link, do as you did with the cat photos
The only difference is that the img is not within a sentence so the opening anchor tag would come before the img opening bracket, and the closing anchor would come after the img closing bracket. And, this step does not require the target attribute or value of “_blank”

Use the following from your previous code for reference only on how to set up the anchor.

Keep up your good progress!