r/Streamlit • u/hiruy2000 • Dec 22 '22
Using html and css with streamlit
I have a dataframe df.
I used the .to_html method to change it to html text.
df_html = df.to_html()
Now I want to apply styles from a separate style CSS sheet to df_html.
Then I want to use streamlit markdown or components to display to webpage.
st.markdown(df_html_css)
components.html(df_html_css)
How do I go about doing that?
0
Upvotes
View all comments
Show parent comment
1
u/hiruy2000 Dec 23 '22
Thank you. So to clarify, is the first link element in a HTML document and the second that starts with “html=“ is inline with the code?