# Markdown table now indenting

**URL:** <https://discuss.streamlit.io/t/markdown-table-now-indenting/39779>\
**Category:** Using Streamlit\
**Created:** [March 21, 2023, 4:10pm UTC](https://discuss.streamlit.io/t/markdown-table-now-indenting/39779 "2023-03-21T16:10:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivan\_Schuster](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/ivan_schuster/32/24245_2.png) [@Ivan\_Schuster](https://discuss.streamlit.io/u/Ivan_Schuster)\
**Post date:** [March 21, 2023, 4:10pm UTC](https://discuss.streamlit.io/t/markdown-table-now-indenting/39779/1 "2023-03-21T16:10:09Z")

</div>

### Summary

I’m trying to create a table using st.markdown(). Since the name and number of columns lead to the table being too wide, I’m trying to name some columns in 2 lines.  
So instead of naming a column like this:  
`this is a really long name of a column`  
I would name it like this:  
`this is a really long`  
`name of a column`

### Steps to reproduce

**Code snippet:**

```auto
st.markdown("""
| Net Profit | Percent Profitable | Expectancy | Column 3<br>(line 1)<br>(line 2) | Rate of Return <br>(Annualized) |
| :------------ | :--------------- | :---------------| :---------------| :---------------|
| Value | Value | Value | Value | Value
| Value | Value | Value | Value | Value 
""")

```

**Actual behavior:**

[[Album] imgur.com ![](https://global.discourse-cdn.com/streamlit/original/3X/c/c/cce0635a200b81f998543704860b21c48c581f99.jpeg "imgur.com") ](https://imgur.com/a/aWyj1S1)

`https://imgur.com/a/aWyj1S1`

### Debug info

- Streamlit version: 1.20.0
- Python version: 3.10
- OS version: Windows 10
- Browser version: Chrome

---

<div class="post-metadata">

**Author:** ![blackary](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/blackary/32/47725_2.png) [@blackary](https://discuss.streamlit.io/u/blackary)\
**Post date:** [March 21, 2023, 4:57pm UTC](https://discuss.streamlit.io/t/markdown-table-now-indenting/39779/2 "2023-03-21T16:57:39Z")

</div>

Just add `unsafe_allow_html=True` to the end of st.markdown to make it render the `<br>`s properly

https://playground.streamlit.app/~/+/?embedded=true&q=ca658c

---

<div class="post-metadata">

**Author:** ![Ivan\_Schuster](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/ivan_schuster/32/24245_2.png) [@Ivan\_Schuster](https://discuss.streamlit.io/u/Ivan_Schuster)\
**Post date:** [March 21, 2023, 5:00pm UTC](https://discuss.streamlit.io/t/markdown-table-now-indenting/39779/3 "2023-03-21T17:00:57Z")

</div>

Thanks a lot @blackary . you are being super helpful

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/streamlit/original/3X/c/f/cf4c2ee0d938358f82448c5fe4b9c3c91d7ce19c.svg) [@system](https://discuss.streamlit.io/u/system)\
**Post date:** [March 20, 2024, 5:00pm UTC](https://discuss.streamlit.io/t/markdown-table-now-indenting/39779/4 "2024-03-20T17:00:59Z")

</div>

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
