What is Markdown?
Markdown is a lightweight markup language created by John Gruber in 2004. It allows you to write formatted text using plain text syntax that's easy to read and write.
Common uses:
- README files on GitHub/GitLab
- Documentation and wikis
- Blog posts and articles
- Note-taking applications
- Forum posts and comments
- Static site generators
File extension: .md or .markdown
Paragraphs
Paragraphs are separated by blank lines. A single line break does not create a new paragraph.
This is the first paragraph.
This is the second paragraph.
This is the third paragraph with
a line break that doesn't create a new paragraph.
Headings
Create headings using # symbols (1-6). More # = smaller heading.
# Heading 1 (H1)
## Heading 2 (H2)
### Heading 3 (H3)
#### Heading 4 (H4)
##### Heading 5 (H5)
###### Heading 6 (H6)
Alternative Syntax (H1 and H2 only)
Heading 1
=========
Heading 2
---------
Best Practices
- Always put a space after the
#symbols - Use only one H1 per document (usually the title)
- Don't skip heading levels (H1 → H3)
- Add blank lines before and after headings
Text Emphasis & Formatting
Bold
**This is bold text**
__This is also bold__
Italic
*This is italic text*
_This is also italic_
Bold and Italic
***Bold and italic***
___Also bold and italic___
**_Another way_**
*__Yet another way__*
Strikethrough
~~This text is crossed out~~
Highlight (Extended)
==Highlighted text== (not all processors support this)
Subscript and Superscript (Extended)
H~2~O (subscript)
X^2^ (superscript)
Lists
Unordered Lists
Use -, *, or + for bullet points.
- First item
- Second item
- Third item
* Alternative syntax
* Using asterisks
+ Or plus signs
+ Work too
Ordered Lists
1. First item
2. Second item
3. Third item
1. Numbers don't need to be sequential
1. Markdown will auto-number
1. This becomes 1, 2, 3
Nested Lists
1. First item
- Nested bullet
- Another nested item
- Third level
2. Second item
1. Nested numbered
2. Another numbered
Task Lists (Checkboxes)
- [x] Completed task
- [x] Another completed task
- [ ] Incomplete task
- [ ] Another incomplete task
Lists with Paragraphs
1. First item
Additional paragraph for the first item.
2. Second item
Another paragraph here.
Links
Inline Links
[Link text](https://example.com)
[Link with title](https://example.com "Hover title")
Reference Links
[Link text][reference-id]
[reference-id]: https://example.com "Optional Title"
Or use the link text as the reference:
[Example][]
[Example]: https://example.com
Autolinks
<https://example.com>
<email@example.com>
Many processors auto-link URLs:
https://example.com
Section Links (Anchors)
[Jump to Headings](#headings)
Headings automatically get IDs:
# My Heading
Link: [Go to My Heading](#my-heading)
Relative Links
[Link to file](./folder/file.md)
[Link to parent](../other-folder/file.md)
[Link to image](./images/photo.jpg)
Images
Inline Images


Reference Images
![Alt text][image-id]
[image-id]: image-url.jpg "Optional title"
Linked Images
[](https://example.com)
Click the image to go to the link.
Image with Size (HTML)
<img src="image.jpg" alt="Alt text" width="300">
Some processors support:
{width=300}
Code
Inline Code
Use `backticks` for inline code.
Use ``double backticks`` to include `literal backticks`.
Fenced Code Blocks
```
Code block without syntax highlighting
```
```javascript
// With syntax highlighting
function greet(name) {
console.log(`Hello, ${name}!`);
}
```
```python
# Python example
def greet(name):
print(f"Hello, {name}!")
```
Indented Code Blocks
Regular paragraph.
// Indent 4 spaces or 1 tab
function example() {
return true;
}
Regular paragraph continues.
Supported Languages
Common language identifiers:
javascript, js | python, py | html |
css | json | xml |
bash, shell | sql | php |
java | c, cpp | csharp |
ruby | go | rust |
typescript, ts | yaml | markdown, md |
Blockquotes
Simple Blockquote
> This is a blockquote.
> It can span multiple lines.
Multi-paragraph Blockquotes
> First paragraph of the quote.
>
> Second paragraph of the quote.
Nested Blockquotes
> Outer quote
>
> > Nested quote
> >
> > > Deeply nested quote
Blockquotes with Other Elements
> ### Heading in a blockquote
>
> - List item 1
> - List item 2
>
> **Bold** and *italic* work too.
>
> ```js
> // Even code blocks!
> console.log("Hello");
> ```
Tables
Basic Table
| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| Cell 1 | Cell 2 | Cell 3 |
| Cell 4 | Cell 5 | Cell 6 |
Column Alignment
| Left | Center | Right |
|:-----|:------:|------:|
| L | C | R |
| Left | Center | Right |
Alignment: :--- left, :---: center, ---: right
Formatting in Tables
| Feature | Syntax |
|---------|--------|
| Bold | `**text**` |
| Italic | `*text*` |
| Code | `` `code` `` |
| Link | `[text](url)` |
Compact Syntax
Header 1 | Header 2
--- | ---
Cell 1 | Cell 2
Horizontal Rules
Create horizontal lines using three or more of the following:
---
***
___
- - -
* * *
All of these create a horizontal rule (<hr>).
Line Breaks
Hard Line Break
First line with two spaces at the end
Second line
Or use a backslash:\
Next line
Or use HTML:
First line<br>Second line
Soft Line Break
These two lines
will appear on the same line in output.
Escaping Characters
Use backslash \ to escape special characters:
\* Not italic \*
\*\*Not bold\*\*
\# Not a heading
\[Not a link\](url)
\`Not code\`
\| Not | a | table |
Characters That Can Be Escaped
\ backslash | ` backtick | * asterisk |
_ underscore | {} braces | [] brackets |
() parentheses | # hash | + plus |
- minus | . dot | ! exclamation |
| pipe |
HTML in Markdown
Most Markdown processors support inline HTML:
<div class="custom">
<p>HTML content here</p>
</div>
<details>
<summary>Click to expand</summary>
Hidden content here.
</details>
<kbd>Ctrl</kbd> + <kbd>C</kbd>
<mark>Highlighted text</mark>
<sub>subscript</sub> and <sup>superscript</sup>
<abbr title="Hypertext Markup Language">HTML</abbr>
Footnotes (Extended)
Here's a sentence with a footnote.[^1]
[^1]: This is the footnote content.
You can also use words[^note].
[^note]: Named footnotes work too.
Multi-paragraph footnotes:
[^long]: First paragraph.
Indented second paragraph.
Third paragraph.
Definition Lists (Extended)
Term 1
: Definition for term 1
Term 2
: Definition for term 2
: Another definition for term 2
Markdown
: A lightweight markup language
: Created by John Gruber in 2004
Emoji
Shortcodes (GitHub, GitLab, etc.)
:smile: :heart: :thumbsup: :rocket:
:warning: :x: :white_check_mark:
:star: :fire: :bug: :memo:
Unicode Emoji
Copy and paste directly:
😀 ❤️ 👍 🚀 ⚠️ ✅ ⭐ 🔥 🐛 📝
Table of Contents
Create a manual table of contents using links to headings:
## Table of Contents
- [Introduction](#introduction)
- [Getting Started](#getting-started)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
- [FAQ](#faq)
## Introduction
Content here...
## Getting Started
Content here...
### Installation
Content here...
Some processors support auto-generated TOC with [TOC] or [[toc]].
Editor Keyboard Shortcuts
| Action | Windows/Linux | Mac |
|---|---|---|
| Bold | Ctrl + B | Cmd + B |
| Italic | Ctrl + I | Cmd + I |
| Link | Ctrl + K | Cmd + K |
Best Practices
- Be consistent: Choose one style (e.g.,
*vs_) and stick with it - Use blank lines: Separate different elements with blank lines
- Indent properly: Use 2-4 spaces for nested content
- Alt text: Always provide alt text for images
- Heading hierarchy: Don't skip heading levels
- Line length: Consider wrapping at 80-120 characters
- Preview: Always preview before publishing
Comments
Comments are hidden in the output: