3  Text, Markdown, and Titles

Most apps will require a good amount of titles, subheaders and general text.

3.1 Text Types

3.1.1 Titles

st.title("This is a title")

3.1.2 Subheaders

st.subheader("This is a subheader")

3.1.3 Text

st.text("This is text displayed with st.text")
st.write("This is text displayed with st.write")

3.1.4 Interactive Examples

3.2 Markdown

import streamlit as st

st.markdown("# This is header level 1")

st.markdown("## This is header level 2")

st.markdown("### This is header level 3")

st.markdown("#### This is header level 4")

st.markdown("##### This is header level 5")

st.markdown("This is standard text")

st.markdown("You can use emojis :sunglasses:")

st.markdown("Or Google material icons :material/favorite:")

st.markdown("You can colour text :red[text to be colored]")

st.markdown("Or colour the background of text :blue-background[text to be colored]")

st.markdown("""
You can also do multiline text.

This allows you to more easily do multi-line text.
Notice
the
impact

of different numbers of newlines between the lines.
""")