Skip to main content
Write markdown. This function takes a string of markdown as input and returns an Html object. Output the object as the last expression of a cell to render the markdown in your app.

Usage

Signature

Parameters

str
required
A string of markdown.

Returns

An Html object.

Interpolation

You can interpolate Python values into your markdown strings, for example using f-strings. Html objects and UI elements can be directly interpolated.
For other objects, like plots, use marimo’s as_html method to embed them in markdown:

LaTeX

Enclose LaTeX in single $ signs for inline math, and double $$ for display math or square brackets for display math. (Use raw strings, prefixed with an “r”, to use single backslashes.)