HELP STEP 12 Can't remove extra anchor (a) elements under element p without image being removed or error arising

The hint states that I should only have one anchor a element in my code and must remove the element a under element p but when I try to remove it the link just shows it self on the web page and if I remove the link and the element both the picture goes away.

  **Your code so far**
<html>
<body>
  <h1>CatPhotoApp</h1>
  <main>
    <h2>Cat Photos</h2>
    <!-- TODO: Add link to cat photos -->
    <p>Click here to view more<a href="cat photos"> cat photos.</a></p>
    <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.">
  </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/102.0.5005.63 Safari/537.36 Edg/102.0.1245.39

Challenge: Step 12

Link to the challenge:

Remove the anchor tag below your paragraph. Your href attribute on the anchor tag that is nested inside your paragraph is not correct. Inside that anchor tag, there should be no space before cat photos, also no dot.

Add a space before the anchor tag and it should work. Please let me know if this is confusing and I won’t hesitate to explain further.

Thankyou so so much for replying. I did what you mentioned and this is what my paragraph looks like now but it is still having an error .It states that the link’s text should be cat photos and that I have either omitted the text or have a typo.

Click here to view more cat photos

Can you post your full html code surrounding it with triple backticks so I can see better what might be the problem? Because that looks good to me

I’m so sorry I don’t understand what backsticks are I’m very new to this, but this is what all my code looks like.

CatPhotoApp

Cat Photos

Click here to view more cat photos

A cute orange cat lying on its back.

edit: i don’t understand its not showing the actual code itself but the task i’ll try fixing that

Yes, I need the code to see the problem


i hope this helps so so sorry for bothering you

Oh, it’s your anchor tag’s href attribute. Fix that and you should pass. You’re not a bother :slight_smile:

Got it. Thankyou so much :slight_smile:

1 Like