"This is a title") st.title(
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
3.1.2 Subheaders
"This is a subheader") st.subheader(
3.1.3 Text
"This is text displayed with st.text") st.text(
"This is text displayed with st.write") st.write(
3.1.4 Interactive Examples
3.2 Markdown
import streamlit as st
"# 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(
"""
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.
""")