Markdown Cheat Sheet — Complete Syntax Reference

Every Markdown and GitHub Flavored Markdown element, with the exact syntax and its rendered output side by side.

  • 14 Categories
  • Rendered Examples
  • Copy Any Snippet
  • Printable

Headings

Markdown
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
Rendered
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6

Emphasis

Markdown
**bold text**
*italic text*
***bold and italic***
~~strikethrough~~
Rendered
bold text
italic text
bold and italic
strikethrough

Paragraphs & Line Breaks

Markdown
This is paragraph one.

This is paragraph two, separated
by a blank line.

Line with two trailing spaces
forces a line break, no blank line needed.
Rendered

This is paragraph one.

This is paragraph two, separated by a blank line.

Line with two trailing spaces
forces a line break, no blank line needed.

Lists

Unordered
- Item one
- Item two
  - Nested item
- Item three
Rendered
  • Item one
  • Item two
    • Nested item
  • Item three
Ordered
1. First step
2. Second step
3. Third step
Rendered
  1. First step
  2. Second step
  3. Third step
Task List (GFM)
- [x] Completed task
- [ ] Incomplete task
Rendered
Completed task
Incomplete task

Images

Markdown
![Alt text](image.png)
![With a title](image.png "Image title")
[![Clickable image](image.png)](https://webeasier.com)
Rendered
🖼️ Renders as an <img> tag; wrapping in [ ]( ) makes the image clickable, linking to a URL.

Code

Inline Code
Use the `map()` function.
Rendered
Use the map() function.
Fenced Code Block
```javascript
console.log('hi');
```
Rendered
console.log('hi');

Tables (GFM)

Markdown
| Left | Center | Right |
| :--- | :---:  | ---: |
| a    | b      | c    |
Rendered
LeftCenterRight
abc

Need a table without hand-counting pipes? Use the Markdown Table Generator.

Blockquotes

Markdown
> A quoted line.
>
> > A nested quote.
Rendered
A quoted line.
A nested quote.

Horizontal Rules

Markdown
---
***
___
Rendered

Escaping Special Characters

Markdown
\* literal asterisk
\# literal hash
\[ \] literal brackets
\` literal backtick
Rendered
* literal asterisk
# literal hash
[ ] literal brackets
` literal backtick

Footnotes (GFM Extension)

Markdown
Here is a claim[^1].

[^1]: This is the footnote text.
Rendered
Here is a claim1.
1. This is the footnote text.

Strikethrough (GFM)

Markdown
~~This was mistaken text~~
Rendered
This was mistaken text

HTML in Markdown

Markdown
<details>
<summary>Click to expand</summary>
Hidden content here.
</details>
Rendered
Click to expandHidden content here.

Most Markdown parsers (including GitHub's) pass raw HTML through untouched — handy for elements Markdown has no native syntax for.

Frequently Asked Questions

The basics are: # for headings, ** for bold, * for italic, - or * for bullet lists, 1. for numbered lists, [text](url) for links, and ![alt](url) for images. These cover the vast majority of everyday Markdown writing.

GFM extends standard Markdown with tables, task lists (checkboxes), strikethrough text, fenced code blocks with syntax highlighting, and automatic URL linking. It's the dialect used by GitHub, GitLab, and most modern documentation tools.

End a line with two or more trailing spaces, or use a backslash (\) at the end of the line, then press Enter. A single Enter with no trailing spaces is usually treated as part of the same paragraph and merged into one line.

Yes. Most Markdown parsers, including GitHub's, pass raw HTML tags through untouched. This is useful for features Markdown doesn't support natively, like <br>, <details>/<summary> collapsible sections, or centering content with <div align="center">.

Put a backslash before the character, e.g. \* displays a literal asterisk instead of starting emphasis, and \# displays a literal hash instead of a heading.