Learn HTML by Building a Cat Photo App - Step 15

Tell us what’s happening:
I followed the formula suggested by a few people on here but its still coming up with error messages.

Can someone tell me what I’m doing wrong?

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." ></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/115.0.0.0 Safari/537.36

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

Link to the challenge:

This part:
<a> href="https://freecatphotoapp.com"
should be:
<a href="https://freecatphotoapp.com">

(The closing > character is not in the right place.)

(Oops! My answer had a typo – hope this is better!)

Good luck, and feel free to ask again if that doesn’t help! :slight_smile:

Hi :slight_smile:

I did that but my error message now reads:

You should have an

img

element with an

src

value of

https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg

. You may have accidentally deleted it. Your

img

element should be nested within the anchor (

a

) element. The entire

img

element should be inside the opening and closing tags of the anchor (

a

) element. // tests completed // console output [TypeError: Cannot read properties of null (reading ‘parentNode’)]

but I did’nt delete it and it cant be a typo because I pasted it in

You only need to move that in here.

<a your code ></a>

1 Like

Yikes! It might be best to reset that step.

Here is what I have from when I did the Cat Photo App a few days ago:
[Sorry – I read in another thread that “full, working solutions” are discouraged. Instead we should guide with hints. So I am removing what I had posted.

But, what I would say if I were answering the question again is to carefully read the code, looking for misplaced quotation marks and closing tag markers.]

1 Like

Thank you!
It was just a syntax error. I missed the > in front of the img element :sweat_smile: I deleted the space after it aswell and its all good now. :slight_smile:

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