HTML5: Link to Internal Sections of a Page with Anchor Elements

what is wrong with my code

<h2>CatPhotoApp</h2>

<main>

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

<h3 id="footer">jump to Bottom</h3>

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

Where is your code??

Click on get help in below run tests on the challenge window, It’ll include your code and link to the challenge in the post

It’s best to use the Ask for Help button, as mentioned above.


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 (’).

I don’t know what’s your problem but the topic is about internal anchor so I can give you a few tips
To link a section of the page (internal anhor) you have to use id attribute .
By taking the example of your above given code, to make an internal anchor with footer element ,set it’s id to footer and give an anchor tag at the top to set the jump to the bottom like this:

<a href="#footer">Jump to the bottom</a>
<main>
<p>'all the content over here'</p>
</main>
<footer id="footer">'some footer content' </footer>

this will take you directly to the bottom of the page
I hope this helps.

2 Likes