Markdown Cheat Sheet — Quick Syntax Reference

Everything you need to know about Markdown syntax — headings, bold, italic, links, images, lists, code, tables, blockquotes, and more. Click any example to copy it.

Headings #
# Heading 1

Heading 1

## Heading 2

Heading 2

### Heading 3

Heading 3

#### Heading 4

Heading 4

##### Heading 5
Heading 5
###### Heading 6
Heading 6
Bold & Italic ** * _
**bold text**
bold text
*italic text*
italic text
***bold and italic***
bold and italic
~~strikethrough~~
strikethrough
Links []()
[OpenCode](https://opencode.ai)
[Reference-style][ref]
[ref]: https://example.com
Images ![]()
![Alt text](https://via.placeholder.com/150)
Alt text
[![Alt](image.png)](https://example.com)
Image wrapped in a link (clickable)
Lists - * 1.
- Unordered item
* Unordered item
  • Unordered item
  • Unordered item
1. First item
2. Second item
  1. First item
  2. Second item
- Parent
  • - Child nested
  • Parent
    • Child nested
Code ` ```
Inline `code` here
Inline code here
```js
console.log("hello");
```
console.log("hello");
Tables | -
| Col A | Col B |
|-------|-------|
| A1 | B1 |
Col ACol B
A1B1
Blockquotes >
> This is a blockquote
This is a blockquote
> Multi-line
> blockquote
Multi-line
blockquote
> **Nested** formatting
Nested formatting
Horizontal Rules --- ***
---

***

___

Task Lists - [ ]
- [x] Completed task
- [ ] Unfinished task
  • Completed task
  • Unfinished task
Strikethrough ~~
~~deleted text~~
deleted text
Inline HTML <>
<ins>Underlined</ins>
Underlined
<span style="color:red">Red</span>
Red
<sub>subscript</sub>
subscript
<sup>superscript</sup>
superscript
Escaping \
\*not italic\*
*not italic*
\# not a heading
# not a heading
\\[not a link\\]
[not a link]
Footnotes [^]
Here is a footnote[^1]
[^1]: Footnote content here
Here is a footnote1
1. Footnote content here
Fenced Code with Language ```lang
```python
def hello():
print("world")
```
def hello():
print("world")
```html
<h1>Title</h1>
```
<h1>Title</h1>
Definition Lists :
Term
: Definition here
Term
Definition here

Markdown Syntax Overview

Markdown is a lightweight markup language created by John Gruber. It uses plain text formatting that can be converted to HTML. This cheat sheet covers the most commonly used Markdown syntax elements.

Most Markdown processors support two flavors: CommonMark (standard) and GitHub Flavored Markdown (GFM) which adds tables, task lists, strikethrough, and fenced code blocks with language highlighting.

Frequently Asked Questions

CommonMark is the standardized specification of Markdown. GitHub Flavored Markdown (GFM) extends CommonMark with tables, strikethrough, task lists, auto-linking, fenced code blocks with language tags, and emoji shortcodes.

End a line with two or more spaces, then press Enter. Or use an HTML <br> tag.

Yes. Any valid HTML can be mixed inline with Markdown. This is useful for elements not natively supported by Markdown, such as <details>, <video>, or custom styling.

Prefix the character with a backslash \. For example, \* renders as a literal asterisk instead of starting italic. Characters that can be escaped: \ * _ {} [] () # + - . !

Use Cases

Documentation

Write README files, API docs, and project wikis using standard Markdown syntax.

Content Creation

Write blog posts, articles, and newsletters in Markdown and convert to HTML or other formats.

Note-Taking

Use Markdown in note apps like Obsidian, Notion, and Joplin for formatted notes.

Code Collaboration

Write comments, issues, and PR descriptions on GitHub using GFM for rich formatting.