Hello there đź‘‹

Thanks for stopping by! We use cookies to help us understand how you interact with our website.

By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.

How do I create an anchor link?

Have you wanted to create anchors so that users of your app can directly navigate to specific sections by specifying #anchor in the URL? If so, let's find out how.

Anchors are automatically added to header text.

For example, if you define a header text via the st.header() command as follows:

st.header("Section 1")

Then you can create a link to this header using:

st.markdown("[Section 1](#section-1)")
forum

Still have questions?

Our forums are full of helpful information and Streamlit experts.