Markdown Cheat Sheet

This cheat sheet provides a quick reference for Markdown syntax, organized into basic and extended features to help you master the essential formatting tools.

Basic Syntax

The core Markdown syntax that works everywhere - these are the fundamental elements that are universally supported across all platforms.

Headers

# H1 - Main Title
## H2 - Section Title
### H3 - Subsection Title

Text Formatting

ElementSyntaxResult
Bold**bold text**bold text
Italic*italic text*italic text
Bold & Italic***bold and italic***bold and italic
Inline Code`code`code

Lists

Unordered Lists:

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

Ordered Lists:

1. First item
2. Second item
1. Nested item 2.1
2. Nested item 2.2
3. Third item

Links

[Link text](https://example.com)
[Link with title](https://example.com "Optional Title")

Images

![Alt text](image.jpg)
![Alt text with title](image.jpg "Optional Title")

Code Blocks

Inline Code:

Use `code` in your sentence.

Code Blocks:

```
Basic code block
```

Blockquotes

> This is a blockquote.
>
> It can span multiple lines.
>
> > Nested blockquotes are also possible.

Horizontal Rules

---
***
___

Line Breaks

  • Hard line break: Add two spaces at the end of a line
  • Paragraph break: Leave a blank line between paragraphs

Escape Characters

Use backslash (\) to escape special characters:

\* This won't be italic
\# This won't be a header

Extended Syntax

These advanced features are supported by GitHub Flavored Markdown (GFM) and most modern Markdown processors. Perfect for enhanced documentation and collaborative projects.

Tables

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

Table Alignment:

| Left Aligned | Center Aligned | Right Aligned |
|:-------------|:--------------:|--------------:|
| Left | Center | Right |
| Text | Text | Text |

Strikethrough

~~Strikethrough text~~

Result: Strikethrough text

Task Lists

- [x] Completed task
- [ ] Incomplete task
- [x] ~~Completed and crossed out task~~
- [ ] Another todo item

Result:

  • Completed task
  • Incomplete task
  • Completed and crossed out task
  • Another todo item

Syntax Highlighted Code Blocks

```javascript
function greet(name) {
console.log("Hello, " + name + "!");
}

greet("World");
```

Common Language Identifiers:

  • JavaScript: javascript or js
  • Python: python or py
  • HTML: html
  • CSS: css
  • JSON: json
  • Shell: bash or sh

Footnotes

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

[^1]: This is the footnote content.

Definition Lists

Term 1
: Definition of term 1

Term 2
: Definition of term 2
: Another definition of term 2

Math Expressions

Inline math: $E = mc^2$

Block math:
$
\sum_{i=1}^{n} x_i = x_1 + x_2 + \cdots + x_n
$

Emoji

:smile: :heart: :thumbsup: :rocket:

Result: 😊 ❤️ 👍 🚀

Highlighted Text

==Highlighted text==

Superscript & Subscript

Superscript: X^2^
Subscript: H~2~O

Start using Markdown today to make your documents more professional and efficient!