-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmarkdown_and_html.py
More file actions
29 lines (19 loc) · 902 Bytes
/
markdown_and_html.py
File metadata and controls
29 lines (19 loc) · 902 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import streamlit as st
st.title("Markdown Example")
# Display a markdown header
st.header("This is a Header")
# Display a markdown paragraph
st.markdown("Streamlit is **awesome** for creating interactive web apps.")
# Display a list
st.markdown("- Item 1\n- Item 2\n- Item 3")
# Display an image with a caption
st.image("https://via.placeholder.com/150", caption="Placeholder Image")
st.title("HTML Example")
# Display an HTML header
st.write("<h1 style='color: blue;'>This is an HTML Header</h1>", unsafe_allow_html=True)
# Display an HTML paragraph
st.write("<p>Streamlit can also render <strong>HTML</strong> content.</p>", unsafe_allow_html=True)
# Display an HTML list
st.write("<ul><li>Item 1</li><li>Item 2</li><li>Item 3</li></ul>", unsafe_allow_html=True)
# Display an HTML image
st.write("<img src='https://via.placeholder.com/150' alt='Placeholder Image'>", unsafe_allow_html=True)