Markdown

Markdown Cheat Sheets

This cheat sheet covers the most common fundamentals of the Markdown syntax.

Getting Started

// Basic Markdown Example

# Heading 1

This is a paragraph.

- List item 1
- List item 2

**Bold text** and *italic text*.
A simple Markdown document

Headings

// Headings

# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
Create headings with #

// Heading Levels

#
H1
##
H2
###
H3
####
H4
#####
H5
######
H6

Text Formatting

// Text Styles

**bold**
Bold text
*italic*
Italic text
~~strikethrough~~
Strikethrough
`inline code`
Inline code
***bold italic***
Bold and italic

// Text Formatting Example

This is **bold**, *italic*, ~~strikethrough~~, and `inline code`.
Bold, italic, strikethrough, code

Links

// Links

[Inline Link](https://www.example.com)

[Reference Link][1]

[1]: https://www.example.com
Inline and reference links

// Link Types

[text](url)
Inline link
[text][id]
Reference link
<https://www.example.com>
Autolink

Images

// Images

![Alt text](https://www.example.com/image.png)

![Reference Image][img1]

[img1]: https://www.example.com/image.png
Inline and reference images

// Image Syntax

![alt](url)
Inline image
![alt][id]
Reference image
![alt](url "Title")
Image with title attribute

Lists

// Unordered List

- Item 1
- Item 2
  - Subitem 2.1
  - Subitem 2.2
Bulleted list

// Ordered List

1. First
2. Second
3. Third
Numbered list

// Task List

- [x] Task 1
- [ ] Task 2
GitHub Flavored Markdown task list

Blockquotes

// Blockquotes

> This is a blockquote.
>
> - You can nest lists
> - And other Markdown elements
Quoting text

// Blockquote Tips

> Nested
Use > for nested blockquotes
Mix
Blockquotes can contain lists, code, etc.

Code

// Inline Code

Use `code` for inline code.
Inline code with backticks

// Code Block

```python
def hello():
    print("Hello, Markdown!")
```
Fenced code block

// Code Block Tips

Indent 4 spaces
Alternative to fenced code block
Syntax highlight
Use language after ```

Tables

// Tables

| Syntax | Description |
|--------|-------------|
| Header | Title       |
| Cell   | Cell        |
Create tables with pipes and dashes

// Table Tips

:---
Left align
:---:
Center align
---:
Right align

Horizontal Rules

// Horizontal Rule

// Horizontal Rule Tips

---
Three or more dashes
***
Three or more asterisks
___
Three or more underscores

Escaping Characters

// Escaping Markdown

// Escapable Characters

\*
Asterisk
\_
Underscore
\`
Backtick
\[
Left bracket
\]
Right bracket

Footnotes & References

// Footnotes

Here is a footnote reference,[^1]

[^1]: Here is the footnote.
Add footnotes (GFM/extended)

// Reference Links

[id]: url
Reference-style link definition
[text][id]
Reference-style link usage

Emoji

// Emoji

I :heart: Markdown! :smile:
GitHub Flavored Markdown emoji

// Popular Emoji Codes

:smile:
😄
:thumbsup:
👍
:rocket:
🚀
:fire:
🔥

HTML in Markdown

// Inline HTML

<span style="color: red;">Red text</span>
Use HTML tags in Markdown

// HTML Elements in Markdown

<br>
Line break
<sup>
Superscript
<sub>
Subscript
<kbd>
Keyboard input

Math/LaTeX

// MathJax/LaTeX

Inline math: $E=mc^2$

Block math:

$$
\int_0^\infty e^{-x} dx = 1
$$
Inline and block math

// Math Syntax

$...$
Inline math
$$...$$
Block math
\frac{a}{b}
Fraction
\sum_{i=1}^n i
Sum

Best Practices & Tips

// Best Practices

Use whitespace
Separate blocks for readability
Preview
Always preview before publishing
Consistent style
Stick to one style for headings/lists
Escape special chars
Use backslash for special characters

Land the career of your dreams!

Get inspired, learn, join competitions and grow in your job!

Sign up now