Adding internal links in HTMl5

HOW to add JUMP to Top link in html5 like jump to bottom

Does your page have a title element? What is that element’s id attribute?
If you’ve made internal page links before, it’s the same process.

1 Like

I am Sorry, let me be clear …I have added Jump to Bottom link already likewise I want Jump to Top link from bottom of the page .
Thanks

How did you set up your Jump to Bottom link?
The links I use just jump to the #id of an element.

Firstly, welcome to the forums.

While we are primarily here to help people with their Free Code Camp progress, we are open to people on other paths, too. Some of what you are asking is pretty trivial in the Free Code Camp context, so you might find that if you’re not getting the instruction and material you need in your current studies, the FCC curriculum will really help you get started. At a modest guess I’d say investing a 4-5 hours working through the curriculum here will really pay off. You can find the curriculum at https://www.freecodecamp.org/learn.

With your current questions, we don’t have enough context to know what you already know or don’t know, so it is impossible to guide you without just telling you the answer (which we won’t do).

It is pretty typical on here for people to share a codepen / repl.it / jsfiddle example of what they have tried so that anyone helping has more of an idea of what help is actually helpful.

Please provide some example of what you’ve tried and I’m sure you’ll get more help.

Happy coding :slight_smile:

1 Like

Hello, it rings a bell. Please see the example below that contains the "jump to top " instance. For the purposes of the example I have removed some paragraph elements.

  1. You need to add an anchor element at the bottom of the code and you may call it “header” in the form of <a href="#header">Jump to top</a>, where “header” is the id.

  2. You now need to add the “header” id to one of the elements at the top of your code. I have chosen <h2>. It will now look like this:

<h2 id="header">CatPhotoApp</h2>

This is because you have to assign the correct id. I hope it helps.

FULL CODE BELOW

<h2 id="header">CatPhotoApp</h2>
<main>

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

  <img src="https://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>
  
 </main>

<footer id="footer">Copyright Cat Photo App</footer>
<a href="#header">Jump to top</a>

Best

1 Like

very useful…thanks

1 Like