Skip to main content
Development

Markdown Cheatsheet: Complete Syntax Guide for Beginners

The complete Markdown syntax reference — headings, bold, italic, links, images, lists, tables, code blocks, blockquotes, and more. A beginner-to-advanced cheatsheet.

April 8, 202510 min readTextNoteKit

Markdown is a lightweight text formatting language created by John Gruber in 2004. The core idea: use plain text symbols to indicate formatting, then render them as HTML. A line starting with # becomes an <h1>. Text wrapped in ** becomes bold. Simple, readable in raw form, and universally supported.

Today Markdown is used on GitHub, GitLab, Reddit, Discord, Notion, Obsidian, Stack Overflow, and in every major static site generator. Understanding its syntax is one of the highest-leverage 30-minute investments a developer, writer, or student can make.

Preview your Markdown live with the TextNoteKit Markdown Previewer

Headings

Headings use the # symbol. The number of # characters determines the heading level (H1–H6).

Markdown
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
Result

Heading 1

Heading 2

Heading 3

Heading 4

Bold and Italic

Markdown
**bold text**
*italic text*
***bold italic***
~~strikethrough~~
Result

bold text
italic text
bold italic
strikethrough

Links and Images

Links use [link text](URL). Images use the same syntax with a ! prefix.

Markdown
[Visit TextNoteKit](https://textnotekit.com)
![Alt text](image.png)
Result

Visit TextNoteKit
[Image: Alt text]

Lists

Unordered lists use -, *, or +. Ordered lists use numbers followed by a period. Nest lists by indenting with 2–4 spaces.

Markdown
- First item
- Second item
  - Nested item

1. Step one
2. Step two
3. Step three
Result
  • First item
  • Second item
    • Nested item
  1. Step one
  2. Step two
  3. Step three

Code

Inline code uses backticks. Code blocks use triple backticks with an optional language name for syntax highlighting.

Markdown
Use `console.log()` for debugging.

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

Use console.log() for debugging.

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

Blockquotes

Prefix lines with > to create blockquotes. Nest with multiple >>.

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

>> Nested quote
Result
This is a blockquote.
It can span multiple lines.
Nested quote

Tables (GitHub Flavored Markdown)

Tables use pipes | and hyphens -. The second row defines alignment with colons.

Markdown
| Name   | Role      | Level  |
|--------|-----------|--------|
| Alice  | Developer | Senior |
| Bob    | Designer  | Mid    |
Result
NameRoleLevel
AliceDeveloperSenior
BobDesignerMid

Horizontal Rules

Three or more hyphens, asterisks, or underscores on a line create a horizontal rule.

Markdown
---
***
___
Result



Task Lists (GitHub Flavored Markdown)

Markdown
- [x] Write the article
- [x] Add code examples
- [ ] Publish and share
- [ ] Update sitemap
Result
  • ✅ Write the article
  • ✅ Add code examples
  • ☐ Publish and share
  • ☐ Update sitemap

Escaping Characters

To display a character that has special Markdown meaning (like * or #) as a literal character, prefix it with a backslash:

Markdown
\*This is not italic\*
\# This is not a heading
Result

*This is not italic*
# This is not a heading

Where Markdown Works

  • GitHub & GitLab — README files, issues, pull request descriptions, and wikis all render Markdown natively.
  • Notion — Supports a subset of Markdown syntax for quick formatting.
  • Obsidian & Logseq — Markdown-first local note-taking apps.
  • Jekyll, Hugo, Gatsby — Static site generators that convert Markdown to HTML.
  • Reddit & Discord — Both support a subset of Markdown for post formatting.
  • Stack Overflow — Questions and answers use Markdown for formatting.

Flavors of Markdown

Standard Markdown (CommonMark) is the baseline. Extensions add additional capabilities:

  • GitHub Flavored Markdown (GFM) — Adds tables, task lists, strikethrough, and syntax highlighting.
  • MDX — Markdown that can contain JSX components. Used in React-based documentation sites.
  • MultiMarkdown — Adds footnotes, citations, and more.

💡 Key Takeaway

"Learning Markdown is a one-time investment that pays dividends forever. Once you know it, you write faster in GitHub, Notion, Obsidian, Reddit, and every documentation tool — they all speak Markdown."

Practice With a Live Preview

The fastest way to learn Markdown is to write it with immediate visual feedback. A live Markdown preview tool shows you the rendered output in real time as you type, so you can see immediately whether your syntax is correct.

Open the Markdown Preview tool — type on the left, see rendered output on the right