Writing consistent, well-structured documentation requires a solid grasp of markup formatting. Markdown simplifies HTML tag creation by using plain-text characters to structure headings, tables, lists, links, and code blocks. This cheat sheet serves as a comprehensive reference guide for standard Markdown syntax, GitHub-Flavored Markdown (GFM) extensions, and common formatting solutions.
Key Takeaways
- Format core typography including headings, bolding, italics, and blockquotes with simple text tags.
- Construct lists, task lists, links, and embedded images quickly using native markdown syntax.
- Build GFM tables with custom column alignments and cell formats.
- Write clean code references using inline backticks and fenced code blocks with language tags.
What is the Quick Reference Syntax?
This section provides quick-reference lookup tables for the most frequently used Markdown syntax elements.
Headings
| Syntax | Output |
|---|---|
# H1 | Heading 1 (largest level) |
## H2 | Heading 2 |
### H3 | Heading 3 |
#### H4 | Heading 4 |
##### H5 | Heading 5 |
###### H6 | Heading 6 (smallest level) |
Always put a single space after #. Most Markdown parsers require it; some are forgiving, but all accept it.
Text Emphasis
| Syntax | Output |
|---|---|
**bold** or __bold__ | bold |
*italic* or _italic_ | italic |
***bold and italic*** | bold and italic |
~~strikethrough~~ | |
`inline code` | inline code |
<mark>highlight</mark> | highlighted text (HTML fallback) |
Lists
| Syntax | What it produces |
|---|---|
- item or * item or + item | Unordered list item |
1. item | Ordered list item |
1. item (all 1s) | Ordered list — numbers auto-increment |
- nested | Nested list (indent with 2–4 spaces) |
- [x] done | Checked task list item (GFM) |
- [ ] todo | Unchecked task list item (GFM) |
Always put a blank line before the first list item if it follows a paragraph block.
Links and Images
| Syntax | What it produces |
|---|---|
[text](url) | Inline link |
[text](url "title") | Link with hover title |
[text][ref] | Reference-style link |
[ref]: url "title" | Reference definition (anywhere in doc) |
<https://url> | Autolink (GFM) |
 | Image |
 | Image with title |
[](link-url) | Clickable image (image wrapped in link) |
Blockquotes
| Syntax | What it produces |
|---|---|
> text | Blockquote |
>> nested | Nested blockquote |
> **Note:** text | Blockquote with bold label |
> continued (blank > between) | Multi-paragraph blockquote |
Code Blocks
| Syntax | What it produces |
|---|---|
`code` | Inline code |
```lang (opening fence) | Fenced code block with syntax highlighting |
``` (closing fence) | End of fenced code block |
| 4 spaces indent | Code block (original spec, avoid in modern MD) |
```diff | Diff block (lines starting with +/- colored) |
Horizontal Rules & Dividers
Any of these on their own line produces <hr />:
| Syntax |
|---|
--- |
*** |
___ |
Put blank lines before and after to avoid being parsed as a heading underline.
Escaping Special Characters
Prefix any Markdown special character with a backslash \ to render it literally:
| Escaped Syntax | Renders as |
|---|---|
\* | * |
\# | # |
\[ | [ |
| ``` | ` |
| | | |
\! | ! |
Special characters that can be escaped: \ * _ {} [] () # + - . !
How to Use Fenced Code Blocks with Language Tags?
Always specify the language after the opening fence. It enables syntax highlighting in GitHub, VS Code previews, and static site generators.
```javascript
const greet = (name) => `Hello, ${name}!`;
```
```python
def greet(name):
return f"Hello, {name}!"
```
```bash
echo "Hello, world!"
```
```sql
SELECT name, email FROM users WHERE active = true;
```For a diff block, lines starting with + render green and lines with - render red:
```diff
- const url = "http://example.com";
+ const url = "https://example.com";
```To show a code fence inside a code fence, use more backticks on the outer fence:
````markdown
```js
// this renders as a code block inside the example
```
````How to Format Tables with Mixed Alignment?
A full GFM table uses hyphens for headers and pipes to separate columns. You can customize text alignment by adding colons to the separator row.
| Name | Role | Salary |
| :----------| :-------: | -------: |
| Alice | Engineer | $95,000 |
| Bob | Designer | $88,000 |
| Carol | Manager | $110,000 |Renders as:
| Name | Role | Salary |
|---|---|---|
| Alice | Engineer | $95,000 |
| Bob | Designer | $88,000 |
| Carol | Manager | $110,000 |
- Pipes do not need to line up perfectly; the parser ignores extra white spaces.
- Every row must contain the same number of cells as the header row.
- You cannot put paragraphs or lists inside cells. For complex layouts, use HTML
<table>blocks.
What are the GitHub-Flavored Markdown (GFM) Extensions?
GFM is GitHub’s superset of CommonMark. It is widely supported by static site engines (including this site via remark-gfm).
- Task lists: Rendered as checkbox lists.
markdown
- [x] Write the README - [ ] Write tests - Strikethrough: Wrapping text in double tildes
~~renders as strikethrough. - Autolinks: Bare URLs and email addresses become clickable without brackets (e.g.
https://example.com).
How do I Use Footnotes in Extended Markdown?
Footnotes are supported in GitHub, Obsidian, and many static site generators.
Here is a sentence with a footnote.[^1]
[^1]: This is the footnote content. It will render at the bottom of the page.How does Markdown Behavior Vary Across Parsers?
Different applications parse Markdown differently. Here is a feature availability breakdown:
| Feature | CommonMark | GFM (GitHub) | MDX (Astro) | Obsidian |
|---|---|---|---|---|
| Tables | No | Yes | Yes (via remark-gfm) | Yes |
| Task lists | No | Yes | Yes | Yes |
| Strikethrough | No | Yes | Yes | Yes |
| Footnotes | No | Yes | Requires plugin | Yes |
| JSX Components | No | No | Yes | No |
| Callout directives | No | No | Yes (via plugin) | Yes |
For this site, all GFM extensions are supported, and JSX components work in .mdx files.
- Blank line before lists: Always leave an empty line before starting a list. Without it, many parsers merge the list items into the preceding paragraph.
- Setext underlines: Hyphens immediately below text turn it into a heading. Separate dividers
---with blank lines. - Pipe characters in tables: Escape literal pipes inside tables with a backslash
\|to prevent breaking columns.
Summary Checklist
- Use ATX style headings (
#) with a single space. - Format emphasis with asterisks (
*and**) or GFM tildes (~~). - Build GFM tables using pipes and hyphens with colon alignment.
- Frame code blocks with triple backticks and language tags.
- Separate blocks (lists, tables, dividers) with blank lines.
Frequently Asked Questions
Can I write standard HTML tags inside Markdown?
Yes. Most Markdown parsers support inline HTML fallbacks. You can write tags like <u>underlined</u> or <img width="100"> directly in your document.
How do I write multi-line footnotes?
To span a footnote over multiple paragraphs, indent the subsequent paragraphs with four spaces or a tab under the footnote definition.
Can I combine MDX components inside GFM tables?
No. Standard markdown tables do not render JSX or MDX components inside cells reliably. Use HTML <table> syntax if you need interactive elements inside columns.
What to Read Next
- Code Blocks in Markdown: Syntax Highlighting Guide — Deep dive into inline code and syntax-highlighted blocks.
- Tables in Markdown: Create & Format Data — Detailed tutorial on aligning and formatting tabular data.
- Images in Markdown: Complete Guide — Master referencing local images, alt text, and clickable illustrations.
Related Articles
Deepen your understanding with these curated continuations.

uv Cheat Sheet: The Fast Python Package Manager (2026)
Complete uv reference — install packages, manage projects, run scripts, pin Python versions, and migrate from pip, poetry, and pyenv with working commands.

Warp Terminal Cheat Sheet: Shortcuts, Workflows & AI Features
Complete Warp reference — block-based terminal, command palette, workflow commands, AI autocomplete, custom themes, and team features in 2026.

React Hooks Cheat Sheet: All Hooks with React 19
Complete React Hooks reference — useState, useEffect, useMemo, useCallback, custom hooks, and React 19's new use(), useOptimistic, and useActionState.



