Skip to content

Markdown Cheatsheet

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

Alternative syntax for H1 and H2:

Heading 1
=========
Heading 2
---------

**bold text**
__also bold__
*italic text*
_also italic_
***bold and italic***
~~strikethrough~~
`inline code`
> Blockquote
> continues here
> Nested blockquote
>> second level

Output:
bold text | italic text | bold and italic | strikethrough | inline code


Unordered:

- Item one
- Item two
- Nested item
- Another nested
- Item three
* Also valid
+ Also valid

Ordered:

1. First item
2. Second item
1. Nested ordered
2. Another nested
3. Third item

Task list (GitHub Flavored Markdown):

- [x] Completed task
- [ ] Incomplete task
- [x] Another done

[Link text](https://example.com)
[Link with title](https://example.com "Tooltip text")
<!-- Reference style -->
[link text][reference]
[reference]: https://example.com "Optional title"
<!-- Auto-link -->
<https://example.com>
<user@example.com>

![Alt text](image.png)
![Alt text](image.png "Optional title")
<!-- Reference style -->
![Alt text][img-ref]
[img-ref]: image.png "Optional title"

Inline:

Use `console.log()` for debugging.

Fenced code block with syntax highlighting:

```javascript
function greet(name) {
return `Hello, ${name}!`;
}
```

Common language identifiers: javascript, typescript, python, csharp, java, sql, bash, powershell, json, yaml, html, css, xml, dockerfile


| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Row 1a | Row 1b | Row 1c |
| Row 2a | Row 2b | Row 2c |
<!-- Alignment -->
| Left | Center | Right |
|:---------|:--------:|---------:|
| left | center | right |

---
***
___

Backslash escapes these special characters:
\ * _ {} [] () # + - . ! `

\*This is not italic\*

Most Markdown renderers allow inline HTML:

<details>
<summary>Click to expand</summary>
Content here (can include Markdown)
</details>
<kbd>Ctrl</kbd>+<kbd>C</kbd>
<mark>highlighted text</mark>

Syntax highlighting in code fences — as shown above.

Tables — as shown above.

Task lists — as shown above.

Autolinks:

Visit https://github.com — automatically linked without brackets.

Strikethrough:

~~deleted text~~

Footnotes:

Here is a statement.[^1]
[^1]: This is the footnote.

Emoji:

:rocket: :white_check_mark: :warning:

Mentions and references (GitHub only):

@username — mention a user
#42 — link to issue/PR
org/repo#42 — cross-repo reference
SHA — link to commit

Alerts (GitHub only):

> [!NOTE]
> Useful information.
> [!WARNING]
> Important warning.
> [!TIP]
> Helpful tip.
> [!IMPORTANT]
> Critical information.
> [!CAUTION]
> Negative potential consequences.

  • Paragraph: separate blocks with a blank line
  • Hard line break: end a line with two or more spaces, then press Enter
  • Soft line break: just pressing Enter (no extra space) — renders as a space in most parsers
First paragraph.
Second paragraph (blank line above).
Line one
Line two (two spaces after "one")

ElementSyntax
Bold**text**
Italic*text*
Bold + Italic***text***
Strikethrough~~text~~
Inline code`code`
Link[text](url)
Image![alt](url)
Heading 1–6# to ######
Blockquote> text
Unordered list- item
Ordered list1. item
Horizontal rule---
Code block```lang ```
Table| col | col |
Task list- [x] done