Stuck in step 14 html challenge even after use google a lot

Hello to all the nice patients developer here!

My issue is i hard stuck in the step 14 of the challenge,
because even if i copy/paste the img code under the <a (anchor)
i still got an error…
please help me! whats wrong with my code?

  **My code**

<html>
<body>
  <h1>CatPhotoApp</h1>
  <main>
    <h2>Cat Photos</h2>
    <!-- TODO: Add link to cat photos -->
    <p>Click here to view more 
      <a> target="_blank" 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>.</p>
  </main>
</body>
</html>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36

Challenge: Step 14

Link to the challenge:

Look at your code carefully and you will find the mistake you are making here. you are closing the “a” element twice.

Thanks but even if i leave it like this :

<a target="_blank" 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>.</p>

it doesnt work,

Says :
Your anchor ( a ) element should have an opening tag. Opening tags have this syntax: <elementName> .

No one want to help me ? i’m still stuck with this problem!

The last code you posted works for me. Although you shouldn’t have the closing </p> tag after the link, but the tests don’t test for that so you can get away with it.

If you are still having problems then I think you need to paste the entire HTML in here so we can see what you are doing.

Oh thank you, finally someone reply! i will link entire html, because im becoming mad…i mean, im wrong, or it’s a bug? that realy upset me.

<html>
  <body>
    <h1>CatPhotoApp</h1>
    <main>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Click here to view more 
        <a target="_blank" 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>

It looks like you removed some of the content from the <p> that was originally there. I would click the Restart Step button to get a fresh start. You don’t want to change anything with the <p>. You just want to make the image a link by wrapping it with an anchor (<a>) element.

after the restart setup, this is the html code :

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

then surround the image with another “a” tag with appropriate “href” attribute

Oh thanks! finally! that simple reply work for me! i also thanks to all forum member that reply to me and try to help me, thanks!
there’s the code that make me solve that step :

<html>
  <body>
    <h1>CatPhotoApp</h1>
    <main>
      <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 target="_blank" href="https://freecatphotoapp.com">cat photos <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>
1 Like

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