What is wrong with my anchor element?

  <a href="#footer">Jump to Bottom.
  
  </a>
  <footer id="footer"</footer>

  <img src="https://www.bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">

I’m getting checkmarks in every box except it says there should only be one footer tag on my page? I’m assuming thats the one at the bottom thats the actual footer but how can I link to it and have one with only one tag I dont understand what i’m messing up here above is my code.

can you please share the challenge link and post all the code you have in the editor?

I don’t know original code.
But notice this.

  • You have your linked section right below your anchor.
  • I’m pretty sure footer tag should be at the bottom of the website.

I would suggest you to reset your code
And add id to the existing footer
And link it using the anchor.

1 Like

HI @xrkr !

Welcome to the forum!

I have edited your post to include the challenge link.

In order for us to help you we need to see the FULL code.
Not 4 lines of it.

The FULL code would be about 15 lines.
This includes the code that was already there plus your answer.

Hope that helps!

Sorry here is link https://www.freecodecamp.org/learn/responsive-web-design/basic-html-and-html5/link-to-internal-sections-of-a-page-with-anchor-elements and my code now is

<h2>CatPhotoApp</h2>
<main>

  <a href="#footer">Jump to Bottom.
  </a>
  

  <img src="https://www.bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">

  <p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff. Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched. Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
  <p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched. Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff. Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
  <p>Meowwww loved it, hated it, loved it, hated it yet spill litter box, scratch at owner, destroy all furniture, especially couch or lay on arms while you're using the keyboard. Missing until dinner time toy mouse squeak roll over. With tail in the air lounge in doorway. Man running from cops stops to pet cats, goes to jail.</p>
  <p>Intently stare at the same spot poop in the plant pot but kitten is playing with dead mouse. Get video posted to internet for chasing red dot leave fur on owners clothes meow to be let out and mesmerizing birds leave fur on owners clothes or favor packaging over toy so purr for no reason. Meow to be let out play time intently sniff hand run outside as soon as door open yet destroy couch.</p>

</main>
<div id="footer">
<footer>Copyright Cat Photo App
  
</footer>

Yes sorry I will remember that for next time I get stuck, I googled some stuff and figured out a solution I didn’t know I could add an ID to the footer tag itself I thought I had to have 2, thank you!

I’ve edited your post 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 are missing the closing div tag, but I think you should not add this. Instead you should give that id to the existing footer element

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