Quarto self-contained HTML: send the report without its folder

The report opens on your computer. Then someone else opens the attachment and gets a page without its chart or styling.

Before rewriting the report, check what you sent: the HTML may still rely on the folder beside it. Quarto can bundle the report’s resources into one HTML file with embed-resources: true.

Make the export a single file

Put this setting in the YAML header of your document. Keep the indentation: embed-resources belongs under html.

---
title: "Workshop attendance review"
format:
  html:
    embed-resources: true
---

Then render that document:

quarto render report.qmd --to html

Without the setting, a normal HTML render can create report.html and report_files/. Sending only the first file can leave its resources behind. Quarto documents the embedded alternative in HTML Basics.

Start with a report you can inspect

This original fictional workshop report contains three attendance figures: 18, 24, and 21 people. Its total is 63, and its largest session is Wednesday with 24. Those are illustrative counts, not measurements of a real workshop.

The downloadable output was rendered with Quarto 1.11.9. Its source includes an SVG illustration as a separate local file; the finished HTML embeds that image. This gives you something concrete to check when you move the HTML away from its source folder.

A real Quarto render of a fictional workshop report: 63 attendances across three sessions.
A real Quarto render of a fictional workshop report: 63 attendances across three sessions.
Open the full example ↗

Open the complete report · Open the standalone HTML · Get the reproducible source ZIP

Unzip the source package, open a terminal in that folder, and run quarto render report.qmd --to html. This example uses Markdown, a local SVG, and CSS. It does not require an R session, a Python notebook, or a live data service. The source file and the exported copy serve different jobs: keep the source for changes and send the HTML for reading.

If you need to calculate a DataFrame first, export the pandas result before deciding how to present it. Packaging a report cannot correct an incorrect calculation.

Test the copy your recipient will get

Create a new empty folder and copy only the rendered HTML into it. Open that copy, rather than the version still sitting beside the source files. In this example, confirm that the three labeled bars remain visible and the text still shows 63 attendances.

For your own report, check every image, tab, code block, and control that matters to the reader. Temporarily disconnect the test device from the network if offline use is required. A successful render is one check; the isolated exported file is the deliverable you actually need to verify.

If a button fetches new data, describe that requirement separately. Embedding a script does not put its future server responses inside the file. A report that calls a server still needs that service; a static copy needs the permitted data included in its output.

If the report contains equations

Quarto does not embed MathJax or KaTeX by default with embed-resources. For a report that needs those libraries offline, add self-contained-math: true under html, render again, and test the equations in the isolated copy. Quarto’s publishing guide explains the exception.

Ask for the packaging change without changing the result

Use this prompt with your existing source when you want help preparing the export. Replace the bracketed details first.

Prepare this Quarto document for delivery as one HTML report.
Reader: [WHO]. Required delivery: [HTML attachment / browser link].
Source document and required local assets: [ATTACH OR LIST].

Preserve the calculations, figures, labels, units, and caveats.
Set format.html.embed-resources to true. If the document uses
MathJax or KaTeX and must work offline, include the corresponding
self-contained-math setting. List anything that still needs a server.

Give me the complete revised QMD and any required source assets.
Show the render command and checks for an isolated HTML copy.
Do not claim you ran Quarto or tested offline unless you actually did.
Do not substitute a screenshot for an interactive element.

Keep the source; choose the reading format

If the recipient requested a PDF, supply a checked PDF. If they need to change the analysis, keep the QMD and its data available to them. A single HTML file is useful when the reader needs the rendered report in a browser; it does not replace those other deliverables.

For a browser link, the report-to-link guide covers the handoff to NOS. Start with the reviewed standalone copy, and test the resulting page as a recipient. Keep any live calculation or server dependency outside that promise. If the report is already going to GitHub Pages, use that delivery route; the Quarto Pages guide deals with a different check: whether the published result actually reflects the latest input.

Keep reading