# Markdown cheat sheet

Core syntax / editable reference

These patterns are source text to copy. The printed sheet preserves the punctuation.

| Purpose | Write this | Result or condition |
| --- | --- | --- |
| Heading | `# Heading` | Heading; leave a space after the marker |
| Subheading | `## Section` | A nested section |
| Emphasis | `*italic*` | Italic text |
| Strong emphasis | `**bold**` | Bold text |
| Inline code | `` `value` `` | Literal text in code style |
| Link | `[label](https://example.com)` | A named link |
| Image | `![description](image.png)` | Loads the referenced image |
| Quote | `> Quoted words` | A blockquote |
| Literal symbol | `\*not italic\*` | Asterisks remain visible |
| Paragraph | A blank line between paragraphs | A new paragraph |

## Lists

Use a space after each marker. Keep a blank line around the block.

```markdown
- Draft
- Review

1. Write
2. Save
```

## Display a fenced code example

The outer fence below has four backticks at both ends. The inner example has three.

`````markdown
````markdown
```python
print("hello")
```
````
`````

CommonMark: spec.commonmark.org/0.31.2/

<!-- sheet-page -->

# Markdown cheat sheet

Extensions / print and reuse

Tables, task lists and strikethrough need a renderer that supports those extensions.

| Purpose | Write this | Scope |
| --- | --- | --- |
| Strikethrough | `~~removed~~` | GFM extension |
| Task marker | `- [ ] Open` or `- [x] Done` | Checkbox support varies |
| Table row | `\| Name \| State \|` | Needs a delimiter row below |
| Delimiter row | `\| --- \| --- \|` | Enables table parsing in table-capable readers |
| Alignment | `:---` / `:---:` / `---:` | Left / center / right in supporting readers |

## A table to copy

```markdown
| Name | State |
| --- | --- |
| Draft | Ready |
```

## Find the failed stage

| Symptom | Inspect | Action |
| --- | --- | --- |
| Pipes appear as text | Is the table extension active? | Select a table-capable reader |
| Task markers stay visible | Are tasks supported separately? | Enable task support or keep text labels |
| Code example swallows later text | Does the outer fence close? | Match both outer fence lengths |
| Content is cut off on paper | Does the HTML already contain it? | Change print layout or shorten the example |

## Keep both copies

Edit the Markdown source. Use the PDF for a fixed visual reference. A PDF alone does not preserve the original Markdown punctuation or renderer settings.

Local comparisons use markdown-it-py CommonMark, Python-Markdown with tables and fenced_code, and Pandoc GFM. They do not test hosted GitHub, VS Code or Jupyter.

GFM: github.github.com/gfm/
