Welcome to the Streamlit community, and thanks for your detailed question! It could be possible that what you’re asking—capturing which hyperlink was clicked and storing its text in a variable, all without using st.button and without a page refresh—is not natively supported by Streamlit’s built-in features. Streamlit’s standard workflow doesn’t provide a way to trigger Python code from a plain HTML hyperlink click (created via st.markdown or st.write) without a page rerun, since those links are handled entirely on the frontend and don’t communicate back to the Python backend.