Browse Source

code review

Falko Schindler 1 year ago
parent
commit
4470c7807b
2 changed files with 3 additions and 3 deletions
  1. 2 2
      nicegui/elements/html.py
  2. 1 1
      website/documentation/content/html_documentation.py

+ 2 - 2
nicegui/elements/html.py

@@ -3,7 +3,7 @@ from .mixins.content_element import ContentElement
 
 class Html(ContentElement):
 
-    def __init__(self, content: str = '', tag: str = "div" ) -> None:
+    def __init__(self, content: str = '', *, tag: str = 'div') -> None:
         """HTML Element
 
         Renders arbitrary HTML onto the page, wrapped in the specified tag. 
@@ -12,6 +12,6 @@ class Html(ContentElement):
         to add it into the body.
 
         :param content: the HTML code to be displayed
-        :param tag: the HTML tag to wrap the content in (default: div)
+        :param tag: the HTML tag to wrap the content in (default: "div")
         """
         super().__init__(tag=tag, content=content)

+ 1 - 1
website/documentation/content/html_documentation.py

@@ -12,7 +12,7 @@ def main_demo() -> None:
     Use the `tag` parameter to produce something other than a div.
 ''')
 def demo_inline() -> None:
-    ui.html('This is rendered as a paragraph.', tag='p')
+    ui.html('This is <u>emphasized</u>.', tag='em')
 
 
 doc.reference(ui.html)