# Markdown basics

Markdown cheat sheet

Last updated

Markdown is plain text with a few punctuation marks that stand in for formatting: # for a heading, * for emphasis, - for a list item. The table below is the quick reference, with the exact syntax for each element and whether Unmarked renders it.

Markdown stays readable as raw text, then formats on render. A dozen or so marks cover almost any document.

The cheat sheet

ElementSyntaxRenders in Unmarked
Heading# H1 … ###### H6Yes
Bold**bold**Yes
Italic*italic*Yes
Strikethrough~~struck~~Yes
Unordered list- itemYes
Ordered list1. itemYes
Nested listindent two spacesYes
Task list- [ ] / - [x]Yes, checkboxes tick in Read mode
Link[text](url)Yes, clickable in Read mode
Local image![alt](pic.png)Yes
Remote image![alt](https://…)Shows as alt text (not fetched)
Inline code`code`Yes
Fenced code```lang … ```Yes, colored by the language tag
Blockquote> quoteYes
Table| a | b |Yes
Horizontal rule---Yes
Frontmatter--- block at topYes, as a properties panel
Math$x^2$ / $$…$$Yes, typeset in Read mode

The sections below expand each row with syntax you can copy.

Headings

One to six # marks set the heading level. More hashes means a smaller, deeper heading.

# Project notes
## Background
### Open questions

That produces a top-level title, a section under it, and a sub-section under that. Unmarked also feeds these to its outline sidebar, so headings double as navigation.

Bold, italic, and strikethrough

Wrap text in ** for bold, a single * for italic, and ~~ for strikethrough.

**Due Friday**, but the *draft* is ready and the ~~old deadline~~ is gone.

You get bold "Due Friday", italic "draft", and a struck-through "old deadline". Strikethrough is a GitHub extension, and Unmarked supports it.

Lists

Start a line with - for a bullet, or 1. for a numbered item. Indent two spaces to nest a list inside another.

- Groceries
  - Oats
  - Coffee
- Errands
 
1. Draft
2. Edit
3. Send

That renders a bulleted list with two nested items, then a numbered list of three steps.

Task lists

A task list is a bullet with a checkbox. Use - [ ] for an open item and - [x] for a done one.

- [x] Write the outline
- [ ] Draft section two
- [ ] Proofread

That produces a checklist with the first item checked. In Unmarked's Read mode the boxes are clickable, and ticking one saves the change straight to the file.

A link is [visible text](url). An image is the same with a ! in front, where the text becomes the alt text.

[Read the docs](https://example.com/docs)
![Wiring diagram](assets/diagram.png)

The link renders as clickable text in Read mode. A local image like assets/diagram.png renders as the picture. A https:// image renders as its alt text instead, because Unmarked doesn't fetch anything from the web.

Inline code and fenced code

Wrap a word in single backticks for inline code. For a block, fence it with three backticks and name the language on the opening line.

Run `npm install` first.
 
```bash
git switch -c fix-typo
git commit -am "Fix typo"
```

The inline part renders npm install in a mono font. The block becomes its own code box. The bash on the opening line is the language tag, which is how editors, GitHub and Unmarked know to color the block as shell code.

Blockquotes

Start a line with > to quote it. The quote keeps its own indented block.

> Plain text outlives the apps that made it.

That renders as an indented, set-off quotation.

Tables

Separate columns with pipes (|) and put a row of dashes under the header. Colons in the dash row set alignment.

| Task     | Owner | Done |
|----------|-------|:----:|
| Outline  | Sam   | yes  |
| Draft    | Lee   | no   |

That renders a three-column table with a header row, and the :----: centers the last column. Tables are a GitHub extension that Unmarked renders.

Horizontal rule

Three or more dashes on their own line draw a divider.

First half of the note.
 
---
 
Second half.

That renders a horizontal line between the two paragraphs. Keep a blank line above it so it isn't read as a heading underline.

Frontmatter

A block fenced by --- at the very top of the file holds metadata as key: value pairs. This is YAML frontmatter.

---
title: Meeting notes
date: 2026-06-28
tags: [planning, q3]
---
 
The notes start here.

The block isn't part of the body. Unmarked reads it and shows it as a properties panel rather than printing the raw --- lines in your document.

Math

Math is a Markdown extension, written in LaTeX notation and read by GitHub and most Markdown editors. Single dollar signs keep a formula inside a sentence. For an equation on its own, start a line with $$, or fence it as a math block.

The area of a circle is $A = \pi r^2$.
 
$$
\sum_{k=1}^{n} k = \frac{n(n+1)}{2}
$$
 
```math
e^{i\pi} + 1 = 0
```

That's one inline formula and two display equations. Need a plain dollar sign in your text? Write \$. Unmarked typesets all three forms in Read mode, on slides and in PDF, and Write mode shows the LaTeX as you typed it. How math works in Unmarked has the details.

In Unmarked

Everything in the table works as shown. Unmarked parses CommonMark with Apple's swift-markdown, plus GitHub's extensions.