Learn Guide

Markdown Basics

Write formatted documents using plain-text syntax that renders as HTML.

What is Markdown?

Markdown is a lightweight markup language that converts plain text into formatted HTML. Created by John Gruber in 2004, it is the standard format for README files, documentation, blog posts, and notes.

Headings

Use # symbols — one per heading level (1 through 6):

# H1 — Page Title
## H2 — Main Section
### H3 — Subsection

Text Formatting

Syntax Result
**bold** or __bold__ Bold
*italic* or _italic_ Italic
~~strikethrough~~ Strikethrough
`code` Inline code

Lists

Unordered — use -, *, or +:

- First item
- Second item
  - Nested item

Ordered — use numbers followed by a period:

1. Step one
2. Step two
3. Step three
[Link text](https://example.com)
[With tooltip](https://example.com "Tooltip")
![Alt text for image](image.png)

Code

Inline: surround with backticks — `code here`

Fenced block with optional language name for syntax highlighting:

```json
{ "key": "value" }
```

Blockquotes

Prefix each line with >:

> This is a blockquote.
> Multiple lines stay in the same block.

Tables

| Column A | Column B |
|----------|----------|
| Cell 1   | Cell 2   |

Alignment: :--- left, :---: center, ---: right.

Horizontal Rule

Three or more dashes, asterisks, or underscores on their own line:

---

Escaping

Prefix any special character with \ to display it literally:

\*not italic\*

Tips

  • Two trailing spaces at the end of a line create a <br> without starting a new paragraph.
  • Blank lines separate paragraphs — a single newline is ignored by most renderers.
  • Most renderers support inline HTML for features Markdown cannot express natively.
  • CommonMark is the standardised spec used by GitHub, VS Code, and most modern tools.