html.py 543 B

12345678910111213141516
  1. from .mixins.content_element import ContentElement
  2. class Html(ContentElement):
  3. def __init__(self, content: str = '') -> None:
  4. """HTML Element
  5. Renders arbitrary HTML onto the page.
  6. `Tailwind <https://tailwindcss.com/>`_ can be used for styling.
  7. You can also use `ui.add_head_html` to add html code into the head of the document and `ui.add_body_html`
  8. to add it into the body.
  9. :param content: the HTML code to be displayed
  10. """
  11. super().__init__(tag='div', content=content)