Change font size in st.write()?

Is it possible to change the fontsize and/or color in st.write()?

Hi @Soren,

If you want different sizes of fonts you have two options,

  1. Go with the standard set of typography provided by streamlit, ie. text, title, header and subheader
  2. Use st markdown and give sizes yourself, This will give you text size of your choice.
import streamlit as st


.big-font {
    font-size:300px !important;
""", unsafe_allow_html=True)

st.markdown('<p class="big-font">Hello World !!</p>', unsafe_allow_html=True)

It looks like this for me :smiley:

Hope it helps !