📝 Markdown Cheat Sheet: Complete Reference Guide

📅 August 26, 2026 📖 6 min read 🏷️ Reference

Markdown is the most widely used markup language for writing documentation, README files, blog posts, and technical content. Whether you're writing a GitHub README, a blog post, or documentation for your project, this cheat sheet has you covered.

Bookmark this page for quick reference — it covers everything from basic syntax to advanced formatting.

⚡ Try Markdown Live

Type Markdown on the left, see HTML output instantly on the right.

Open Markdown to HTML Converter →

📌 Headers

MarkdownHTML Output
# Heading 1<h1>Heading 1</h1>
## Heading 2<h2>Heading 2</h2>
### Heading 3<h3>Heading 3</h3>
#### Heading 4<h4>Heading 4</h4>
##### Heading 5<h5>Heading 5</h5>
###### Heading 6<h6>Heading 6</h6>

📝 Text Formatting

MarkdownResult
**bold text**bold text
*italic text*italic text
***bold italic***bold italic
~~strikethrough~~strikethrough
`inline code`inline code

📋 Lists

Unordered List

- Item 1
- Item 2
  - Nested item 2.1
  - Nested item 2.2
- Item 3

Ordered List

1. First item
2. Second item
3. Third item
   1. Nested item 3.1
   2. Nested item 3.2

Task List (GitHub Flavored)

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

🔗 Links & Images

MarkdownHTML Output
[link text](https://example.com)<a href="...">link text</a>
[link](https://example.com "title")Link with title attribute
![alt text](image.png)<img src="..." alt="...">
[![alt](image.png)](link)Image as link

💻 Code Blocks

Inline Code

Use `console.log()` to print output.

Fenced Code Block

```javascript
function greet(name) {
  return `Hello, ${name}!`;
}
console.log(greet('World'));
```

Indented Code Block

    // Indent with 4 spaces
    const x = 42;

📊 Tables

| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| Cell 1   | Cell 2   | Cell 3   |
| Cell 4   | Cell 5   | Cell 6   |


| Left | Center | Right |
|:-----|:------:|------:|
| L    | C      | R     |

📌 Blockquotes

> This is a blockquote
>
> It can span multiple lines

Nested Blockquotes

> Outer quote
>
>> Nested quote

➖ Horizontal Rules

---
***
___

🎯 Extended Syntax (GitHub Flavored Markdown)

Footnotes

Here's a sentence with a footnote[^1].

[^1]: This is the footnote content.

Strikethrough

~~This was mistaken text~~

Emoji (GitHub)

:smile: :heart: :thumbsup:
:rocket: :trophy: :100:

Alerts (GitHub)

> [!NOTE]
> Useful information users should know.

> [!TIP]
> Helpful advice for doing things better.

> [!WARNING]
> Urgent info that needs attention.

> [!CAUTION]
> Advises about risks.

📱 Platform-Specific Features

PlatformSpecial Features
GitHubTask lists, alerts, mentions (@user), issues (#123), emoji
GitLabMermaid diagrams, math (KaTeX), video
NotionCallouts, toggles, databases, embeds
SlackNo headers, simple formatting only
DiscordNo headers, spoilers (||text||)

✅ Best Practices

  1. Use ATX headers (#) instead of Setext (underlines)
  2. Add blank lines before and after block elements
  3. Use fenced code blocks with language identifiers
  4. Keep lines under 80 characters for raw readability
  5. Use reference-style links for long URLs
  6. Always include alt text for accessibility

🔗 Conclusion

Markdown is simple yet powerful. With these syntax patterns, you can create well-structured, readable content for any platform. The beauty of Markdown is that it's readable both as raw text and as rendered HTML.

Start with the basics — headers, lists, and links — then explore extended features as you need them.