Markdown Cheatsheet

Whether you're just starting with Markdown or looking for a quick reference, this guide provides an easy-to-follow overview of the most commonly used Markdown formatting options. From headings to links and tables, you'll find everything you need to create clean and readable content. Use this cheatsheet to streamline your writing process and improve your Markdown skills.

Headers

Use hashes to define header levels from H1 to H6.
# H1
## H2
### H3
#### H4
##### H5
###### H6

H1

H2

H3

H4

H5
H6

Typography

Separate paragraphs with a blank line.
This is the first paragraph.

This is the second paragraph.

This is the first paragraph.

This is the second paragraph.

Use two spaces at the end of a line to create a line break.
This line ends with two spaces.  
This line starts after a break.

This line ends with two spaces.
This line starts after a break.

Use asterisks or underscores for italic and bold text.
*italic* or _italic_

**bold** or __bold__

***bold italic***

italic or italic

bold or bold

bold italic

Use the greater-than symbol for blockquotes.
> This is a blockquote.

This is a blockquote.

Lists

Use dashes or asterisks for unordered lists.
- Item 1
- Item 2
  - Nested Item
  • Item 1
  • Item 2
    • Nested Item
Use numbers for ordered lists.
1. First
2. Second
3. Third
  1. First
  2. Second
  3. Third

Images

Add an exclamation mark before link syntax for images.
![Alt text](https://hosted.md/img/logo.svg)

Alt text

Code

Use backticks for inline code.
This is `inline code`.

This is inline code.

Use triple backticks for code blocks.
```
function hello() {
  return 'Hello';
}
```
function hello() {
  return 'Hello';
}

Horizontal Rules

Use three dashes, asterisks, or underscores to create a horizontal line.
---

Tables

Use pipes and dashes to create tables.
| Column 1 | Column 2 |
|----------|----------|
| Row 1    | Data     |
Column 1Column 2
Row 1Data

GitHub Flavored Markdown

Escape special Markdown characters using a backslash.
\*Not italicized\*

*Not italicized*

Use square brackets to create task lists. Use `[x]` for completed and `[ ]` for incomplete items.
- [x] Write documentation
- [ ] Write tests
  • Write documentation
  • Write tests
Wrap text with double tildes to add a strikethrough effect.
This is ~~obsolete~~ updated text.

This is obsolete updated text.

Specify a language for syntax highlighting by adding it after the opening triple backticks.
```js
console.log('Hello, world!');
```
console.log('Hello, world!');
Create tables using pipes and dashes. Align columns using colons.
| Left | Center | Right |
|:-----|:------:|------:|
| A    | B      | C     |
LeftCenterRight
ABC
Mention users or teams by prefixing with `@`. These turn into links on GitHub.
Thanks to @octocat for the update.

Thanks to @octocat for the update.

Reference issues and pull requests with `#` followed by a number.
See #42 for more info.

See #42 for more info.

Markdown Extended

Use a term followed by a colon to create a definition list. Supported in Markdown Extra.
Term 1
: Definition 1

Term 2
: Definition 2
Term 1
Definition 1
Term 2
Definition 2
Use `<sub>` HTML tags directly for subscript.
H<sub>2</sub>O

H2O

Use `<sup>` HTML tags directly for superscript.
E = mc<sup>2</sup>

E = mc2

Create footnotes using `[^1]` and define them at the end.
This is some text with a footnote.[^1]

[^1]: This is the footnote.

This is some text with a footnote.1

  1. This is the footnote.
Markdown allows raw HTML for advanced layout or unsupported elements.
<div class="note">
  <p>This is a custom HTML block.</p>
</div>

This is a custom HTML block.