Report.add_html¶
add_html ¶
add_html(html: str, *, title: str = '', caption: str | None = None, notes: str | None = None, id: str | None = None) -> ReportItem
Add a html snippet.
| Parameters: |
|
|---|
Example¶
report.add_html(
'<p>Results are <strong>preliminary</strong>.</p>',
title='Interpretation',
)
HTML fragments are inserted without escaping, sanitization, or modification. Only include trusted HTML. Use Report.add_text() for ordinary text that should be escaped.
External HTML may bring its own styles, scripts, or resource dependencies. The caller is responsible for internal HTML identifiers and resource availability. HTML components cannot be regenerated from JSON report recipes.