Link within a page on Codepen.io

So I am finishing up my Tribute Page and I want to link within my page with the navbar that I spent a few hours figuring out. So I want to make thinks within my page you know like ‘back to top’ link and such. I have googled the issue and have only found enough to know that linking from Codepen is not easy. So has anyone tried to do what I am talking about or should I just move on with what I have?

1 Like

I think you are googling the wrong thing then. Linking to parts in your page couldn’t be simpler, even in CodePen. Make sure the element you want to link to has an id like #top, and then you can easily link to it!

<header id="top"></header>

... snip content ...

<footer>
  <a href="#top">Back to Top!</a>
</footer>

Working demo:

2 Likes

Thanks for showing me that it does work, it works a lot better when you put the ‘#’ symbol with you href. Attention to detail, thanks for the quick response.

1 Like