Tagged: anchors, Buttons, page jumps
I am trying to create a “go back” button that takes me to a specific section on the previous page.
I have tried assigning this section an ID and then setting the link for the button manually, but I’m wondering if I am doing it wrong.
Is there a standard way to do this?
The only way I know of to do this involves creating a static link to a specific page URL, followed by the ID.
For example, if I want to link to the #section-2 of the /about-page, I would create a link like this:
<a href="/about-page/#section-2">Anchor Text</a>
*
*(This assumes you’ve added the ID of section-2 to an element on the /about-page).
Of course – this works – but only if you are linking to a specific page.
It’s not dynamic like a BACK button is.
Hi,
Thanks for sharing @chrisbryant, did you try that out and did you have any luck with it @taylorwedo?
Best regards,
Rikard