# st.components.v1.html

Source: https://docs.streamlit.io/develop/api-reference/custom-components/st.components.v1.html

> **Deprecation notice**
>
> <code>st.components.v1.html</code> was deprecated in version 1.56.0 and will be removed in a later version. Use <a href="https://docs.streamlit.io/develop/api-reference/text/st.iframe"><code>st.iframe</code></a> instead. To insert HTML into your app without an iframe, use <a href="https://docs.streamlit.io/develop/api-reference/text/st.html"><code>st.html</code></a>.

* Function signature:

   ```python
   st.components.v1.html(html, width=None, height=None, scrolling=False, *, tab_index=None)
   ```

* Parameters:

   | name | type | default | description |
   |---|---|---|---|
   | html | str |  | The HTML string to embed in the iframe. |
   | width | int | element | The width of the iframe in CSS pixels. By default, this is the app's default element width. |
   | height | int |  | The height of the frame in CSS pixels. By default, this is 150. |
   | scrolling | bool |  | Whether to allow scrolling in the iframe. If this False (default), Streamlit crops any content larger than the iframe and does not show a scrollbar. If this is True, Streamlit shows a scrollbar when the content is larger than the iframe. |
   | tab_index | int or None | behavior | Specifies how and if the iframe is sequentially focusable. Users typically use the Tab key for sequential focus navigation. This can be one of the following values:  None (default): Uses the browser's default behavior. -1: Removes the iframe from sequential navigation, but still allows it to be focused programmatically. 0: Includes the iframe in sequential navigation in the order it appears in the document but after all elements with a positive tab_index. Positive integer: Includes the iframe in sequential navigation. Elements are navigated in ascending order of their positive tab_index.  For more information, see the tabindex documentation on MDN. |
