Learn HTML by Building a Cat Photo App - Step 15

###Says I’m missing a closing tag after the image, added one. Still doesn’t work.
For some reason it says i am missing a closing tag after my image i looked and added one still doesn’t work. Somebody please help.

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

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 15

you don’t have the opening a tag before the image either, and you have a lot of stuff that shouldn’t be there.
Make sure to have the closing > for the img tag, which is missing, here:

, and delete everything you have after that

Sorry for not replying for 2 days, i tried that and my code didn’t pass, i kinda understood your point but please clarify more.
Here is my new code, still isn’t passing.

<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>
      <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg"</a> <a alt="A cute orange cat lying on its back."</a>
    </main>
  </body>
</html>

Hi! Look at closely to img tag, you close it with > sign. It must be <img /> but you place <a/>. So delete <a/> after the name of your jpg and place />.

To avoid this confusion next time, be sure to close immediatly any tags after openning it

I done that and still doesn’t seem to work? It says i am missing a closing (a) tag after the image
Here my code

<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>
      <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg"/> <a alt="A cute orange cat lying on its back."</a>
    </main>
  </body>
</html>

Your <a> needs href attribute to know where to go.

Ok I catch what you need to do! just wrap your img tag with a tag. As <a><img/></a>

Don’t forget to give href attribute to you a tag.

Href? Where do i place that, i think i correctly applied the 1st paragraph but not the second, please clarify a bit more!

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

Don’t get confuse ok? Do this

Mod edit: removed solution

1 Like

Thank you! I realised from the code you sent that all i needed to do was add the link to the cat photos with href and fix where i placed my (a) and (/>). I was just getting confused from what the instructions were telling me. Thanks alot, took me a while to get past that step.

1 Like

@kat.dris13

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

1 Like

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