# Exporting & sharing

Export Markdown to self-contained HTML

Last updated

To turn a Markdown file into HTML in Unmarked, open it, press ⇧⌘E, and choose HTML. You get one self-contained file with the CSS and images embedded, ready to put on the web or drop into an email. Prefer to bring your own styling? Switch to minimal markup in Settings. The conversion runs on your Mac. Nothing is uploaded.

Export to HTML

  1. Open your Markdown file in Unmarked.
  2. Press ⇧⌘E, or choose File ▸ Export.
  3. Pick HTML as the format.
  4. Choose where to save, then export.

You end up with a .html file you can open in any browser, attach to an email, or upload to a server.

Two kinds of HTML

"HTML" means two different things depending on what you're doing with it, so Unmarked writes either one.

The self-contained file carries its CSS and any local images inside it, so it opens the same on another Mac, a Windows PC or a phone, with nothing to send alongside. Code blocks tagged with a language come out in color, and they switch to dark code colors when the browser is in dark mode.

Minimal markup is clean HTML tags with no styling, for a site that already has a stylesheet or for your own CSS. Code keeps its structure but carries no colors, so your stylesheet decides how it looks.

You choose between them in Settings ▸ Export ▸ HTML ▸ Include built-in styling. It's on by default, which gives you the self-contained file. Turn it off for minimal markup.

What carries over

The content you see in Read mode comes across as proper HTML elements: headings, paragraphs, bold and italic, ordered and nested lists, task lists, blockquotes, inline code, fenced code blocks, links and tables. Export uses Unmarked's fixed style, so the self-contained version looks consistent whatever reading or writing font you've set in Settings.

Math becomes MathML in both versions. Browsers draw it themselves, so the equations show up without an internet connection.

A rendered Mermaid diagram embeds in the self-contained file too, so the page still works offline. Any raw HTML you wrote in the Markdown passes through, with scripts and other active content removed.

Heads up: footnotes ([^1]) appear as plain text in the HTML, the same as on screen. Images linked from the web (https://…) come across as their alt text, while images stored next to your file embed normally. (Why web images show as alt text.)

Pasting into an email or chat

For Mail, Slack or Notion you don't need an export. Copy as Rich Text (⌥⌘C) pastes formatted text, and Copy as HTML puts the markup on your clipboard.