priority_high

Warning

You are reading the documentation for Streamlit version 1.22.0, but 1.52.0 is the latest version available.

Display an HTML string in an iframe.

Function signature[source]

st.components.v1.html(html, width=None, height=None, scrolling=False)

Parameters

html (str)

The HTML string to embed in the iframe.

width (int)

The width of the frame in CSS pixels. Defaults to the app's default element width.

height (int)

The height of the frame in CSS pixels. Defaults to 150.

scrolling (bool)

If True, show a scrollbar when the content is larger than the iframe. Otherwise, do not show a scrollbar. Defaults to False.

forum

Still have questions?

Our forums are full of helpful information and Streamlit experts.