Streamlit Markdown

Question:

I am using markdown and try to color words like it says in the streamlit documentation but it won’t work, any can help me please ?

import streamlit as st
st.markdown("Text can be :blue[azul], but also :orange[laranja]. And of course it can be 
:red[red]. And :green[verde]. And look at this :violet[violeta]!")

it is all black.

enter image description here

Thanks

Asked By: Dini

||

Answers:

st.markdown(
    'This will print <span style="color:blue;"> blue text </span>',
    unsafe_allow_html=True
) 
Answered By: chc

Ensure that have streamlit updated (1.16.0) and try:

st.markdown("This text is :red[colored red], and this is **:blue[colored]** and bold.")
Answered By: PUCH
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.