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 -->

    <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.">

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

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

Link to the challenge:

having trouble with this step 15, we asked to turn the image into a link by surrounding it with necessary element tags. I have opened an anchor and inserted the link but then i cant close the anchor and its affecting the img anchor too if I don’t close it

Hi @hope12 ,
You have to wrap the <img...> tag with the anchor tag.
for example,

<a> <img....> </a>

Also, remove the . at the end of the address. (com.)

i tried it already, its saying i can only add only one anchor and that i should remove any extra tags

where is your closing anchor tag </a>?

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

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 (').

really don’t understand but let me try

Hi @hope12 ,
You are missing brackets! Pay attention to how brackets are placed & try to correct them.
ex:

<a href="http://mystupidlink.com"><img src="http://mystupidimage.com" alt="some image"></a>

hi @isuru.dex sorry for the late replies

<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.">

so this is how i wrote it but then it keeps saying i should add only one opening anchor and that i should remove the other one

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 (').

You need to add a closing anchor tag.

1 Like

Okay. So just add a closing anchor tag </a> at the end of your code (the code in your last reply) & you’re good to go!

thanks a lot for your help.
really appreciate

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