Markdown Cheatsheet: Every Syntax You Need (With Examples)
Markdown is a lightweight way to write formatted text using plain characters. It's used for README files, documentation, notes, forum posts, and blogs. The basics take minutes to learn, and this cheatsheet covers the syntax you'll use most.
Headings and text
# Heading 1
## Heading 2
### Heading 3
**bold** *italic* ***both*** ~~strikethrough~~
A line with two trailing spaces
forces a line break. A blank line starts a new paragraph.
Lists
- Bullet item
- Another item
- Nested item (indent two spaces)
1. First
2. Second
3. Third
- [x] Task done
- [ ] Task to do
Links and images
[Link text](https://example.com "optional title")

<https://example.com> automatic link
Code
Inline `code` uses single backticks.
```js
// fenced block with a language for syntax highlighting
console.log("hello");
## Quotes, rules, and tables
A block quote
--- a horizontal rule
| Name | Role |
|---|---|
| Ada | Admin |
## Escaping special characters
Put a backslash before a character that Markdown would otherwise interpret: \\\* \\\_ \\# \\\` \\[ \\]. This is how you write a literal asterisk or underscore.
## Flavors differ
- Original Markdown is small; GitHub Flavored Markdown (GFM) adds tables, task lists, strikethrough, and autolinks.
- Some platforms add extras such as footnotes, math, or callouts. Check what yours supports.
- Raw HTML is allowed in many renderers but may be sanitized for safety.
> **Preview as you write**
>
> A live preview catches unclosed code fences and mis-indented lists immediately. Use a local previewer so unpublished drafts stay private.
## Frequently asked questions
### How do I make a line break in Markdown?
End the line with two spaces (or a backslash in some flavors), or leave a blank line for a new paragraph.
### How do I write a literal asterisk?
Escape it with a backslash, like \\\*, so it isn't treated as emphasis.
### What is GitHub Flavored Markdown?
An extension of Markdown that adds tables, task lists, strikethrough, and automatic links.
### How do I add a code block with syntax highlighting?
Use three backticks followed by the language name, then close the block with three backticks.
**Try it:** [Markdown Cheatsheet & Previewer](https://markdown.ilovekit.app/cheatsheet) — free, runs in your browser, nothing is uploaded.
*Originally published at [ilovekit.app](https://ilovekit.app/blog/markdown-cheatsheet).*