Skip to main content

HtmlOutput

HTML output widget for displaying custom HTML content.

Examples

Basic Usage

This example runs a form with a single page containing the widget

Example Code

from abstra.forms import HtmlOutput, run

my_html = """
<div>
<h1>HTML Output</h1>
<p>This is a simple HTML output example.</p>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
</div>
"""

# Create a page with the widget
example_page = [
HtmlOutput(my_html),
]

# Run the form
result = run([example_page])

# Print the result
print(result)

Parameters

NameDescriptionTypeDefault
html (required)The HTML content to display.strNone
full_widthWhether the content should take up the full width of its container.boolFalse