Learn HTML by Building a Cat Photo App - Step 15

Tell us what’s happening:
Describe your issue in detail here

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->

<!-- User Editable Region -->

      <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>                           
     <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."</a>

<!-- User Editable Region -->

    </main>
  </body>
</html>

they are telling me that am missing a closing tag after the image

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36

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

Link to the challenge:

You have two closing </a> tags. You should only have one.

You don’t have a > at the end of the opening a tag.

And you removed the > at the end of the img tag.

Remember, you turn something into a link by wrapping it (or nesting it) in an anchor element (opening and closing a tags). You don’t need to make any changes to the thing you are turning into a link. You just need to add an opening a tag before it and a closing a tag after it.

2 mistakes:
1- You did close the “anchor tag” both in the middle and at the end. You need to take out the closing “a” tag in the middle
and 2- you must also close the image tag with a > after the end of the alt=“A huge…on its back.” like this :
(take this first </a> out then add an end carrot:) <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
Mod edit: removed

To display your code in here you need to wrap it in triple back ticks. On a line by itself type three back ticks. Then on the first line below the three back ticks paste in your code. Then below your code on a new line type three more back ticks. The back tick on my keyboard is in the upper left just above the Tab key and below the Esc key. You may also be able to use Ctrl+e to automatically give you the triple back ticks while you are typing in the this editor and the cursor is on a line by itself. Alternatively, with the cursor on a line by itself, you can use the </> button above the editor to add the triple back ticks.

am still confused
they either tell me am repeating tags or am missing tags

@Jeffreydne Please do not try to give the solutions to the challenges. You can provide hints like bbsmooth is doing, and point them in the right direction. It is up to those who ask the question to figure out the code themselves. We should not provide actual code to solve the challenge

Look at how you created the “cat photos” link in the previous steps:

<a target="_blank" href="https://freecatphotoapp.com">cat photos</a>

Do you see how you put an opening a tag before the words “cat photos” and a closing a tag after the words “cat photos”? That’s how you turn anything into a link, including an image.

1 Like

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

is this ok

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 shouldn’t change the img element at all.

Your closing a tag needs to come after the img element so the img element is inside of the anchor element.

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

is this ok

Please try to format your code when posting code.

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

Can you say what you believe a ‘closing anchor tag’ is?

You closing a tag is not after your img element.

Also, you still made changes to your img element. You need to remove all the changes you made to the img element. The easiest way to do that is to reset the code for the step.

When you create a link you want to put the words that you want to link between the opening tag and </a? closing tag. Therefore instead of putting a closing tag after the link you should delete that and instead put an closing tag after your image element which would turn your image into a link.

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