Once you’ve written in markdown, you often need a format others can open easily: PDF for printing or submission, or HTML for the web. Here’s how to do it well.
Export to HTML
HTML is the natural output of markdown: headings become <h1>–<h6>, lists and links are semantic, and you get one clean file. Use it when you’re publishing to a site, embedding in another page, or styling with your own CSS.
Export to PDF
PDF is ideal for printing, assignments, and “final” documents. Two common approaches:
- From the browser: Export as HTML first, then open the HTML file in your browser and use Print → Save as PDF. Your current theme (e.g. light/dark) can affect how it looks, so pick a theme that suits the document before printing.
- From the editor: If your editor supports “Export to PDF” or “Print to PDF” (e.g. via the preview pane), use that for a one-step workflow. The result will match the on-screen preview.
Tips for better output
- Use clear heading levels (
#,##,###) so PDF/HTML have a good structure and optional table of contents. - Keep one main idea per paragraph for easier reading in both HTML and PDF.
- For PDF, choose a simple, readable theme and a normal font size so print and on-screen look consistent.
Keeping the markdown source
Always keep the .md file as the source of truth. Export to HTML or PDF when you need to share or print. That way you can edit the markdown later and re-export without redoing layout. In Modern Markdown Editor, “Export as Markdown” gives you the raw file so you can back it up or move it to another tool.
With a good editor and these habits, exporting markdown to PDF and HTML becomes a quick, repeatable part of your workflow.