Learn HTML by Building a Cat Photo App - Step 15

Turn the picture into a link iteration.
PLEASE HELP! give me a hint.
Not looking for the answer I know I’m missing something simple here.
Thanks!

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <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>
      <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.">
    </main>
  </body>
</html>

Your browser information:

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

My code so far

CatPhotoApp

Cat Photos

Click here to view more cat photos.

A cute orange cat lying on its back.

CODE:
++

CatPhotoApp

Cat Photos

Click here to view more cat photos.

A cute orange cat lying on its back.
1 Like

I cant even paste the code… it’s working but not passing me…

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <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>
      <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.">

Did this work?

Try to click on the restart button and then try this exercise again but this time

  • do not modify the img at all
  • add an opening anchor tag on the left of the image
  • add a closing anchor tag on the right of the image.

I even debugged this with Mozilla and it all matches… I’ve tried restarting Still nothing… Here’s what I have, is there an error? Everything is working fine in the sandbox??

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <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>
      <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>
    </main>
  </body>
</html>

Yes there are two errors.
1- the img has been modified. You deleted the > at the end
2- the closing anchor tag should look like this

</a>

Solution just had to delete everything on the page and paste what I pasted here… maybe a bug…

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <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>
      <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>
    </main>
  </body>
</html>

:grinning: thanks for the help!!

1 Like

We have blurred this solution so that users who have not completed this challenge can read the discussion in this thread without giving away the solution.

1 Like

Again thanks! For the help!

1 Like

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