I am trying to use a hyperlink in my streamlit webapp. On clicking the same, it should load the html file (from the local directory) in a new tab. I have attached a code snippet depicting the same.
I am not well conversant with HTML, I am trying to figure out a simple way.
import streamlit as st legend= """<html> <body> <h2>Terms & Condition</h2> <p><a href=TnC.html>My Custom Webpage</a></p> </h1> </body> </html>""" st.markdown(legend, unsafe_allow_html=True)
TnC HTML Code
<html> <head></head> <body> <p>Terms & Conditions</p> </body> </html>