How to make smaller gaps between horizontal line and text

I was trying to put text under and above horizontal line, but it makes too big gaps between elements. I was trying to do it in this way

st.markdown("""Something
--- 

Something
""")

Also, I did set up margins and tried components.html() but without success. I can create h. line but with big gaps like this

I was wondering, is there a way how to make it more “squeezed”?, also to set up linewidth would be great option.

You could probably try using emoji:

st.write(":heavy_minus_sign:" * 34) # horizontal separator line.

Just change 34 as needed.

Cheers