# Markdown Cheat Sheet: Syntax Reference with Examples

> This reference lists every common Markdown element with a plain, one-line explanation and a short, copyable fenced code example.

- Page: https://acepdfmd.com/guides/markdown-cheat-sheet/
- Updated: 2026-09-14
- Runs at: https://acepdfmd.com (Uploaded files are deleted within 60 minutes. No signup for light use.)
- Also in 29 languages: https://acepdfmd.com/<lang>/guides/markdown-cheat-sheet/

## Headings, Paragraphs and Line Breaks

Headings use one to six `#` characters followed by a space; fewer `#` means a bigger heading. A blank line starts a new paragraph. To force a line break inside a paragraph, end a line with two spaces or a backslash.

```
# Heading 1
### Heading 3

A paragraph.
Line break with two trailing spaces above.
```

## Emphasis, Links and Images

Asterisks or underscores mark italic and bold text, and combining them gives both. Links use square brackets for the text and parentheses for the URL; images use the same syntax with a leading `!`.

```
*italic*  **bold**  ***bold italic***
[link text](https://example.com)
![alt text](https://acepdfmd.com/path/to/image.png)
```

## Lists and Nested Lists

Unordered lists use `-`, `*` or `+`. Ordered lists use numbers followed by a period. Indent by two or four spaces to nest a list inside another.

```
- item one
- item two
  - nested item
1. first
2. second
```

## Tables

GitHub Flavored Markdown adds pipe tables. A row of dashes under the header row sets the column structure and can set alignment.

```
| Name | Type |
| --- | --- |
| Alpha | text |
| Beta | number |
```

## Code, Blockquotes and Horizontal Rules

Backticks mark inline code, and triple backticks open a fenced block, optionally tagged with a language for highlighting. A `>` at the start of a line marks a blockquote; stack multiple `>` to nest quotes. Three dashes, asterisks or underscores alone on a line draw a horizontal rule.

```
Use `git status` to check the working tree.
```

```python
print("hello")
```

```
> A quoted sentence.
>> A nested quote.

---
```

## Task Lists and Escaping

GitHub Flavored Markdown supports checkboxes inside list items. A backslash before a special character prints it literally instead of triggering formatting. Raw HTML tags are also allowed inline in most renderers, though this cheat sheet sticks to plain Markdown syntax.

```
- [x] done
- [ ] not done

Escaped: \* not italic \*
```

## GitHub Flavored Markdown vs CommonMark

CommonMark defines the core rules: headings, emphasis, lists, links, code blocks and blockquotes. GitHub Flavored Markdown builds on CommonMark and adds tables, task lists, strikethrough and automatic linking of bare URLs. A file written for one usually renders fine in the other, but tables and checkboxes need GitHub Flavored Markdown support specifically.

## Extended Syntax: Math, Footnotes, Front Matter and Diagrams

Support for these extensions varies by renderer, so check the target tool before relying on them. Math uses LaTeX-style delimiters, footnotes use a caret and a label, front matter is a metadata block at the top of the file, and diagrams use a tagged fenced code block.

```
Inline math: $a^2 + b^2 = c^2$
Block math: $$E = mc^2$$

Text with a note.[^1]
[^1]: The note itself.

---
title: Example document
date: 2026-01-01
---
```

```mermaid
graph TD
  A --> B
  B --> C
```

## Putting It Together

Write and preview a document with the [Markdown Editor](https://acepdfmd.com/tool/markdown-editor/), check syntax problems with [Markdown Lint](https://acepdfmd.com/tool/markdown-lint/), and generate a table of contents with [Markdown TOC](https://acepdfmd.com/tool/markdown-toc/). When you need a shareable file, export with [Markdown to PDF](https://acepdfmd.com/tool/markdown-to-pdf/) or [Markdown to Word](https://acepdfmd.com/tool/markdown-to-word/). For a deeper look at converting PDFs back into Markdown, see the [PDF to Markdown guide](https://acepdfmd.com/guides/pdf-to-markdown-guide/).

## Tools mentioned in this guide

- [Markdown Editor & Preview](https://acepdfmd.com/tool/markdown-editor/): Open, write, and edit Markdown with a live rich preview (tables, images, task lists), then export to .md, PDF, Word, or HTML.
- [Markdown Linter and Formatter](https://acepdfmd.com/tool/markdown-lint/): Fix spacing, headings, lists and tables to a consistent style and get a report of what changed.
- [Markdown Table of Contents](https://acepdfmd.com/tool/markdown-toc/): Auto-generate and insert a linked Table of Contents from your headings.
- [Markdown to PDF](https://acepdfmd.com/tool/markdown-to-pdf/): Convert a .md file into a formatted PDF.
- [Markdown to Word](https://acepdfmd.com/tool/markdown-to-word/): Convert a .md file into an editable DOCX.

## More guides

- [PDF Page Sizes and Dimensions: A4, Letter, Legal and More](https://acepdfmd.com/guides/pdf-page-sizes/)
- [How PDF Compression Works and Why Some Files Barely Shrink](https://acepdfmd.com/guides/pdf-compression-guide/)
- [PDF to Markdown: How It Works and How to Use It for AI](https://acepdfmd.com/guides/pdf-to-markdown-guide/)
- [OCR for PDFs and Images: How to Get Accurate Text](https://acepdfmd.com/guides/ocr-guide/)
- [Is It Safe to Upload a PDF Online? A Privacy Guide](https://acepdfmd.com/guides/privacy-guide/)
- [Open and Convert iWork Files (Pages, Numbers, Keynote) Without a Mac](https://acepdfmd.com/guides/iwork-guide/)
- [JSON Tools Guide: Convert Documents and Data to JSON and Back](https://acepdfmd.com/guides/json-guide/)
