Skip to main content

How can I set anchor-links?

In this article, you will learn how to set anchor-links.

Vanessa Haack avatar
Written by Vanessa Haack
Updated today


🔄 Difference between “Scroll to” and anchor-links

In Onepage there are two ways to lead visitors to a specific section of your page:

Option 1: “Scroll to” function (recommended)

With this function, you can set buttons or menu items so that they automatically scroll to a specific section of the currently open page when clicked. This is easy to set up and requires no code

Option 2: Anchor-links with user-defined code

If you have specific requirements, such as linking from other pages directly to a specific section of your onepage site, you can set up anchor links with custom code.

📌 Note: If you only want to jump to a section within your one-page site, we recommend using the “Scroll to” function. You can find instructions on the “Scroll to” function in our article: How to add different functions to a CTA button (see section “Scroll to”).


⚠️ Important: A direct function for anchor-links is currently not provided. However, you can use this with custom code. Please note, however, that customizations via custom code are outside the scope of our support.

What is an anchor-link?

An anchor-link is a special link on a website that jumps directly to a specific section of a specific page. It is often used to make it easier for users to navigate quickly, e.g. from a button directly to a section on another page.

Why do you need anchor-links on a website?

Anchor-links help to make content on a website more accessible. They allow visitors to jump directly to relevant sections without having to scroll for a long time. This improves user-friendliness and saves time.

What is the difference between a normal link and an anchor-link?

A normal link leads to another page or website, while an anchor-link jumps to a specific location within the same page or on another page.



⚙️To set anchor-links, please carry out the following steps:

Step 1: Select target section

Please select your target section and add the element “Custom code”:



Step 2: Enter code

Please enter the following code:
<div id="NAME"></div>

⚠️ Important: Please replace the value “NAME” with a desired value. After the process, please update the page.



Step 3: Search domain

Enter your domain in the search bar, followed by your anchor-link.
e.g.: https://test.com/#about-us

The anchor link should be added after your domain and always starts with a # sign.
Copy this link from the search bar.



Step 4: Inserting the link

You can now either place the link behind a button:


or in the menu:

⚠️ Important: After the change, please update your page again.


That's it!🎉 The anchor-links have been successfully integrated into your website.



Here you will find a video with the complete instructions. Have fun watching it!



💡Do you have any feedback concerning this article? Please let us know through our live chat or at support@onepage.io, so we may keep it up to date. Thank you! 🙂

Did this answer your question?